mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Bind handleEvent to squire instance
`handleEvent` can be called with the wrong context, force it to be bound to the squire instance.
This commit is contained in:
parent
b2f0c42553
commit
d815049ab5
3 changed files with 4 additions and 2 deletions
|
@ -2373,6 +2373,7 @@ function Squire ( root, config ) {
|
|||
this._doc = doc;
|
||||
this._root = root;
|
||||
|
||||
this.handleEvent = this.handleEvent.bind(this);
|
||||
this._events = {};
|
||||
|
||||
this._isFocused = false;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -44,6 +44,7 @@ function Squire ( root, config ) {
|
|||
this._doc = doc;
|
||||
this._root = root;
|
||||
|
||||
this.handleEvent = this.handleEvent.bind(this);
|
||||
this._events = {};
|
||||
|
||||
this._isFocused = false;
|
||||
|
|
Loading…
Reference in a new issue