diff --git a/app/assets/javascripts/select-kit/components/select-kit.js.es6 b/app/assets/javascripts/select-kit/components/select-kit.js.es6 index 18e45adfa93..b157e5d16d0 100644 --- a/app/assets/javascripts/select-kit/components/select-kit.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit.js.es6 @@ -92,17 +92,6 @@ export default Ember.Component.extend( this.set("computedContent", []); this.set("highlightedSelection", []); - if (this.site && this.site.isMobileDevice) { - this.setProperties({ - filterable: isNone(this.get("filterable")) - ? false - : this.get("filterable"), - autoFilterable: isNone(this.get("autoFilterable")) - ? false - : this.get("filterable") - }); - } - if (this.get("nameChanges")) { this.addObserver( `content.@each.${this.get("nameProperty")}`, diff --git a/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6 b/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6 index 347c2f7c4e0..a4dee3d4ac0 100644 --- a/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6 +++ b/app/assets/javascripts/select-kit/mixins/dom-helpers.js.es6 @@ -82,8 +82,10 @@ export default Ember.Mixin.create({ }, focus() { - Ember.run.schedule("afterRender", () => { - this.$header().focus(); + Ember.run.next(() => { + Ember.run.schedule("afterRender", () => { + this.$filterInput().focus(); + }); }); }, @@ -93,11 +95,7 @@ export default Ember.Mixin.create({ // next so we are sure it finised expand/collapse Ember.run.next(() => { Ember.run.schedule("afterRender", () => { - if ( - (this.site && this.site.isMobileDevice) || - !context.$filterInput() || - !context.$filterInput().is(":visible") - ) { + if (!context.$filterInput() || !context.$filterInput().is(":visible")) { context.$header().focus(); } else { context.$filterInput().focus(); diff --git a/app/assets/javascripts/select-kit/mixins/events.js.es6 b/app/assets/javascripts/select-kit/mixins/events.js.es6 index 80c47622725..9f982e80a2a 100644 --- a/app/assets/javascripts/select-kit/mixins/events.js.es6 +++ b/app/assets/javascripts/select-kit/mixins/events.js.es6 @@ -16,11 +16,11 @@ export default Ember.Mixin.create({ }, willDestroyElement() { - this._super(); + this._super(...arguments); $(document).off("mousedown.select-kit"); - if (this.$header()) { + if (this.$header().length) { this.$header() .off("blur.select-kit") .off("focus.select-kit") @@ -28,7 +28,7 @@ export default Ember.Mixin.create({ .off("keydown.select-kit"); } - if (this.$filterInput()) { + if (this.$filterInput().length) { this.$filterInput() .off("change.select-kit") .off("keydown.select-kit") @@ -37,7 +37,7 @@ export default Ember.Mixin.create({ }, didInsertElement() { - this._super(); + this._super(...arguments); $(document).on("mousedown.select-kit", event => { if (!this.element || this.isDestroying || this.isDestroyed) { diff --git a/app/assets/stylesheets/common/select-kit/multi-select.scss b/app/assets/stylesheets/common/select-kit/multi-select.scss index 5d0c270f79f..9b7e158aa91 100644 --- a/app/assets/stylesheets/common/select-kit/multi-select.scss +++ b/app/assets/stylesheets/common/select-kit/multi-select.scss @@ -64,9 +64,9 @@ } .choices { - margin: 0; + margin: 1px; box-sizing: border-box; - display: inline-flex; + display: flex; justify-content: flex-start; flex-wrap: wrap; @@ -79,7 +79,7 @@ justify-content: space-between; flex-wrap: wrap; flex-direction: row; - margin: 2px; + margin: 1px; } .filter { diff --git a/app/assets/stylesheets/mobile/select-kit/dropdown-select-box.scss b/app/assets/stylesheets/mobile/select-kit/dropdown-select-box.scss index 1853c4e2308..5d4c46832b5 100644 --- a/app/assets/stylesheets/mobile/select-kit/dropdown-select-box.scss +++ b/app/assets/stylesheets/mobile/select-kit/dropdown-select-box.scss @@ -2,7 +2,7 @@ &.dropdown-select-box { .select-kit-collection { max-height: 200px; - overflow-y: scroll; + overflow-y: auto; } } }