FIX: Get composer height after transition.
This commit is contained in:
parent
aa81261875
commit
b3a5381e79
|
@ -532,10 +532,13 @@ const ComposerView = Discourse.View.extend(Ember.Evented, {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
Em.run.next(() => {
|
Em.run.next(() => {
|
||||||
const sizePx = self.get('composeState') === Discourse.Composer.CLOSED ? 0 : $('#reply-control').height();
|
$('#main-outlet').css('padding-bottom', 0);
|
||||||
$('#main-outlet').css('padding-bottom', sizePx);
|
|
||||||
// need to wait a bit for the "slide down" transition of the composer
|
// need to wait a bit for the "slide down" transition of the composer
|
||||||
Em.run.later(() => {
|
Em.run.later(() => {
|
||||||
|
if (self.get('composeState') !== Discourse.Composer.CLOSED) {
|
||||||
|
$('#main-outlet').css('padding-bottom', $('#reply-control').height());
|
||||||
|
}
|
||||||
|
|
||||||
this.appEvents.trigger("composer:closed");
|
this.appEvents.trigger("composer:closed");
|
||||||
}, 400);
|
}, 400);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue