FIX: closing an empty fullscreen composer with toggler prevents scrolling

This commit is contained in:
Joe 2018-10-17 13:52:47 +08:00 committed by GitHub
parent b1d7582abe
commit 5815a33a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -889,10 +889,6 @@ export default Ember.Controller.extend({
} }
]); ]);
} else { } else {
// in case the composer is
// cancelled while in fullscreen
$("html").removeClass("fullscreen-composer");
// it is possible there is some sort of crazy draft with no body ... just give up on it // it is possible there is some sort of crazy draft with no body ... just give up on it
this.destroyDraft(); this.destroyDraft();
this.get("model").clearState(); this.get("model").clearState();
@ -969,6 +965,10 @@ export default Ember.Controller.extend({
}, },
close() { close() {
// the 'fullscreen-composer' class is added to remove scrollbars from the
// document while in fullscreen mode. If the composer is closed for any reason
// this class should be removed
$("html").removeClass("fullscreen-composer");
this.setProperties({ model: null, lastValidatedAt: null }); this.setProperties({ model: null, lastValidatedAt: null });
}, },