FIX: avoid touch on select-kit causing instant closing of it
This commit is contained in:
parent
8a7cbeef00
commit
d32c95b6e8
|
@ -46,7 +46,9 @@ export default Ember.Mixin.create({
|
||||||
|
|
||||||
@on("didInsertElement")
|
@on("didInsertElement")
|
||||||
_setupResizeListener() {
|
_setupResizeListener() {
|
||||||
$(window).on("resize.select-kit", () => this.collapse() );
|
if (!(this.site && this.site.isMobileDevice)) {
|
||||||
|
$(window).on("resize.select-kit", () => this.collapse() );
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@on("willDestroyElement")
|
@on("willDestroyElement")
|
||||||
|
@ -69,10 +71,10 @@ export default Ember.Mixin.create({
|
||||||
// try to focus filter and fallback to header if not present
|
// try to focus filter and fallback to header if not present
|
||||||
focusFilterOrHeader() {
|
focusFilterOrHeader() {
|
||||||
Ember.run.schedule("afterRender", () => {
|
Ember.run.schedule("afterRender", () => {
|
||||||
if (this.$filterInput().is(":visible")) {
|
if ((this.site && this.site.isMobileDevice) || !this.$filterInput().is(":visible")) {
|
||||||
this.$filterInput().focus();
|
|
||||||
} else {
|
|
||||||
this.$header().focus();
|
this.$header().focus();
|
||||||
|
} else {
|
||||||
|
this.$filterInput().focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue