diff --git a/app/assets/javascripts/discourse/components/category-select-box.js.es6 b/app/assets/javascripts/discourse/components/category-select-box.js.es6 index 9be9c3e689f..e0ec28846e5 100644 --- a/app/assets/javascripts/discourse/components/category-select-box.js.es6 +++ b/app/assets/javascripts/discourse/components/category-select-box.js.es6 @@ -61,6 +61,16 @@ export default SelectBoxComponent.extend({ this.set("content", filteredCategories); }, + @on("didRender") + _bindComposerResizing() { + this.appEvents.on("composer:resized", this, this.applyDirection); + }, + + @on("willDestroyElement") + _unbindComposerResizing() { + this.appEvents.off("composer:resized"); + }, + @on("init") @observes("site.sortedCategories") _updateCategories() { diff --git a/app/assets/javascripts/discourse/components/select-box.js.es6 b/app/assets/javascripts/discourse/components/select-box.js.es6 index b6761cbdee8..fa160ddc1bd 100644 --- a/app/assets/javascripts/discourse/components/select-box.js.es6 +++ b/app/assets/javascripts/discourse/components/select-box.js.es6 @@ -136,7 +136,7 @@ export default Ember.Component.extend({ this._bindTab(); Ember.run.schedule('afterRender', () => { - this._applyDirection(); + this.applyDirection(); this._positionSelectBoxWrapper(); }); } else { @@ -272,7 +272,7 @@ export default Ember.Component.extend({ }); }, - _applyDirection() { + applyDirection() { this.$().removeClass("is-reversed"); const offsetTop = this.$()[0].getBoundingClientRect().top;