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:
Arpit Jalan 2022-08-22 17:41:56 +05:30 committed by GitHub
parent ec8306835d
commit b567cebffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -1475,6 +1475,7 @@ export default Controller.extend({
elem.classList.remove("composer-open");
document.activeElement?.blur();
document.documentElement.style.removeProperty("--composer-height");
this.setProperties({ model: null, lastValidatedAt: null });
},

View File

@ -86,6 +86,14 @@ acceptance("Composer", function (needs) {
"400px",
"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) {