FIX: allows more chars than a-z in select-kit
This commit is contained in:
parent
d08b596e47
commit
666386d4b7
|
@ -66,10 +66,10 @@ export default Ember.Mixin.create({
|
||||||
this._destroyEvent(event);
|
this._destroyEvent(event);
|
||||||
})
|
})
|
||||||
.on("keydown.select-kit", event => {
|
.on("keydown.select-kit", event => {
|
||||||
const keyCode = event.keyCode || event.which;
|
|
||||||
|
|
||||||
if (document.activeElement !== this.$header()[0]) return event;
|
if (document.activeElement !== this.$header()[0]) return event;
|
||||||
|
|
||||||
|
const keyCode = event.keyCode || event.which;
|
||||||
|
|
||||||
if (keyCode === this.keys.TAB && event.shiftKey) {
|
if (keyCode === this.keys.TAB && event.shiftKey) {
|
||||||
this.unfocus(event);
|
this.unfocus(event);
|
||||||
}
|
}
|
||||||
|
@ -104,13 +104,11 @@ export default Ember.Mixin.create({
|
||||||
this.set("renderedFilterOnce", true);
|
this.set("renderedFilterOnce", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyCode >= 65 && keyCode <= 122) {
|
|
||||||
Ember.run.schedule("afterRender", () => {
|
Ember.run.schedule("afterRender", () => {
|
||||||
this.$filterInput()
|
this.$filterInput()
|
||||||
.focus()
|
.focus()
|
||||||
.val(this.$filterInput().val() + String.fromCharCode(keyCode));
|
.val(this.$filterInput().val() + String.fromCharCode(keyCode));
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue