Hide form parts with the hidden attribute.

This commit is contained in:
tim
2026-09-26 15:27:51 +02:00
parent 65426a327d
commit 716a609f4e
6 changed files with 27 additions and 16 deletions
+2 -4
View File
@@ -82,11 +82,9 @@ test("showHide switches between the text and the image tabs", () => {
let focused = 0;
w.storyEditor = { focus: () => focused++ };
assert.equal(w.showHide("upload"), true);
assert.deepEqual([$("textparent").style.display, $("uploadparent").style.display, $("wordcounter").style.display],
["none", "block", "none"]);
assert.deepEqual([$("textparent").hidden, $("uploadparent").hidden, $("wordcounter").hidden], [true, false, true]);
assert.equal(w.showHide("text"), true);
assert.deepEqual([$("textparent").style.display, $("uploadparent").style.display, $("wordcounter").style.display],
["block", "none", "block"]);
assert.deepEqual([$("textparent").hidden, $("uploadparent").hidden, $("wordcounter").hidden], [false, true, false]);
assert.equal(focused, 1);
assert.equal(w.showHide("other"), false);
});