mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: remove "--composer-height" style when composer is closed (#18022)
* FIX: remove "--composer-height" style when composer is closed * fix typo * fix linting
This commit is contained in:
@@ -1475,6 +1475,7 @@ export default Controller.extend({
|
|||||||
elem.classList.remove("composer-open");
|
elem.classList.remove("composer-open");
|
||||||
|
|
||||||
document.activeElement?.blur();
|
document.activeElement?.blur();
|
||||||
|
document.documentElement.style.removeProperty("--composer-height");
|
||||||
this.setProperties({ model: null, lastValidatedAt: null });
|
this.setProperties({ model: null, lastValidatedAt: null });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,14 @@ acceptance("Composer", function (needs) {
|
|||||||
"400px",
|
"400px",
|
||||||
"sets --composer-height back to 400px when composer is opened from draft mode"
|
"sets --composer-height back to 400px when composer is opened from draft mode"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await fillIn(".d-editor-input", "");
|
||||||
|
await click(".toggle-minimize");
|
||||||
|
assert.strictEqual(
|
||||||
|
document.documentElement.style.getPropertyValue("--composer-height"),
|
||||||
|
"",
|
||||||
|
"removes --composer-height property when composer is closed"
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("composer controls", async function (assert) {
|
test("composer controls", async function (assert) {
|
||||||
|
|||||||
Reference in New Issue
Block a user