mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:15:05 +08:00
Merge pull request #3647 from tgxworld/fix_draft_too_much_padding
FIX: Get composer height after transition.
This commit is contained in:
commit
750a3ce5e5
|
@ -532,10 +532,13 @@ const ComposerView = Discourse.View.extend(Ember.Evented, {
|
|||
const self = this;
|
||||
|
||||
Em.run.next(() => {
|
||||
const sizePx = self.get('composeState') === Discourse.Composer.CLOSED ? 0 : $('#reply-control').height();
|
||||
$('#main-outlet').css('padding-bottom', sizePx);
|
||||
$('#main-outlet').css('padding-bottom', 0);
|
||||
// need to wait a bit for the "slide down" transition of the composer
|
||||
Em.run.later(() => {
|
||||
if (self.get('composeState') !== Discourse.Composer.CLOSED) {
|
||||
$('#main-outlet').css('padding-bottom', $('#reply-control').height());
|
||||
}
|
||||
|
||||
this.appEvents.trigger("composer:closed");
|
||||
}, 400);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user