mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
FIX: modify select-box orientation when composer resizes
This commit is contained in:
parent
21d6c7f6b3
commit
9c446fcb4d
@ -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() {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user