mirror of
https://github.com/discourse/discourse.git
synced 2025-05-17 10:03:10 +08:00
FIX: closing an empty fullscreen composer with toggler prevents scrolling
This commit is contained in:
parent
b1d7582abe
commit
5815a33a9a
@ -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 });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user