0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed gh-search-input tests failing on Ember 3.10

This commit is contained in:
Kevin Ansfield 2019-05-20 11:25:59 +01:00
parent cfb54feb15
commit 8aba726bc8

View file

@ -27,7 +27,10 @@ export default Component.extend({
}, },
resetInput() { resetInput() {
this.$('input').val(''); let input = this.element && this.element.querySelector('input');
if (input) {
input.value = '';
}
}, },
handleKeydown(e) { handleKeydown(e) {
@ -41,14 +44,17 @@ export default Component.extend({
}, },
open() { open() {
this.get('select.actions').open(); this.select.actions.open();
}, },
close() { close() {
this.get('select.actions').close(); this.select.actions.close();
}, },
_focusInput() { _focusInput() {
this.$('input')[0].focus(); let input = this.element && this.element.querySelector('input');
if (input) {
input.focus();
}
} }
}); });