0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -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:
Islam Sharabash 2016-06-09 19:30:21 -07:00
parent b2f0c42553
commit d815049ab5
3 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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;