FIX: ensures events have access to correct context (#7621)

This commit is contained in:
Joffrey JAFFEUX 2019-05-28 19:40:28 +02:00 committed by GitHub
parent b1d3c678ca
commit bc14452585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,17 +148,17 @@ export default Ember.Mixin.create({
didInsertElement() {
this._super(...arguments);
$(document).on("mousedown.select-kit", this._mouseDownHandler);
$(document).on("mousedown.select-kit", this._mouseDownHandler.bind(this));
this.$header()
.on("blur.select-kit", this._blurHeaderHandler.bind(this))
.on("focus.select-kit", this._focusHeaderHandler.bind(this))
.on("keydown.select-kit", this._keydownHeaderHandler.bind(this))
.on("keypress.select-kit", this._keypressHeaderHandler);
.on("keypress.select-kit", this._keypressHeaderHandler.bind(this));
this.$filterInput()
.on("change.select-kit", this._changeFilterInputHandler.bind(this))
.on("keypress.select-kit", this._keypressFilterInputHandler)
.on("keypress.select-kit", this._keypressFilterInputHandler.bind(this))
.on("focusout.select-kit", this._focusoutFilterInputHandler.bind(this))
.on("keydown.select-kit", this._keydownFilterInputHandler.bind(this));
},