mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 21:19:41 -06:00
FIX: make sure the element exists before calling off
This commit fixes an issue happening only when running tests under `/qunit` and not with `rake qunit:test`
This commit is contained in:
parent
7533e5b541
commit
12beb77afa
@ -19,18 +19,22 @@ export default Ember.Mixin.create({
|
|||||||
.off("mousedown.select-kit")
|
.off("mousedown.select-kit")
|
||||||
.off("touchstart.select-kit");
|
.off("touchstart.select-kit");
|
||||||
|
|
||||||
this.$header()
|
if (this.$header()) {
|
||||||
.off("focus.select-kit")
|
this.$header()
|
||||||
.off("blur.select-kit")
|
.off("focus.select-kit")
|
||||||
.off("keypress.select-kit")
|
.off("blur.select-kit")
|
||||||
.off("keydown.select-kit");
|
.off("keypress.select-kit")
|
||||||
|
.off("keydown.select-kit");
|
||||||
|
}
|
||||||
|
|
||||||
this.$filterInput()
|
if (this.$filterInput()) {
|
||||||
.off("change.select-kit")
|
this.$filterInput()
|
||||||
.off("keydown.select-kit")
|
.off("change.select-kit")
|
||||||
.off("keypress.select-kit")
|
.off("keydown.select-kit")
|
||||||
.off("focus.select-kit")
|
.off("keypress.select-kit")
|
||||||
.off("focusin.select-kit");
|
.off("focus.select-kit")
|
||||||
|
.off("focusin.select-kit");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
Loading…
Reference in New Issue
Block a user