From ec23b553a245d3d57f428d03002ed77a785d300a Mon Sep 17 00:00:00 2001 From: Tianren Dong Date: Thu, 10 Sep 2026 09:31:19 -0400 Subject: Improve Chrome input reliability and release 0.15.49 --- test-suite/challenges/21-keyboard-modifiers.html | 7 +- test-suite/challenges/44-input-reliability.html | 105 +++++++++++++++++++++++ 2 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 test-suite/challenges/44-input-reliability.html (limited to 'test-suite/challenges') diff --git a/test-suite/challenges/21-keyboard-modifiers.html b/test-suite/challenges/21-keyboard-modifiers.html index 870bef6..d18d484 100644 --- a/test-suite/challenges/21-keyboard-modifiers.html +++ b/test-suite/challenges/21-keyboard-modifiers.html @@ -30,9 +30,12 @@ for (const name of ["keydown","keypress","keyup","input"]) { }); } -t.addEventListener("input", () => { - if (t.value !== "A") return; +// input fires before keyup. Grade only when Shift is released so a valid chord +// cannot fail merely because its release events have not happened yet. +t.addEventListener("keyup", (event) => { + if (event.key !== "Shift") return; const bad = []; + if (t.value !== "A") bad.push(`value=${JSON.stringify(t.value)} (need 'A')`); const downShift = log.find(e => e.name === "keydown" && e.key === "Shift"); const downA = log.find(e => e.name === "keydown" && e.code === "KeyA"); const upShift = log.find(e => e.name === "keyup" && e.key === "Shift"); diff --git a/test-suite/challenges/44-input-reliability.html b/test-suite/challenges/44-input-reliability.html new file mode 100644 index 0000000..7576376 --- /dev/null +++ b/test-suite/challenges/44-input-reliability.html @@ -0,0 +1,105 @@ + + +44 input reliability + + + + +
+

Upload and text-input reliability

+

Read window.__inputFixture.caption. Type it into the empty editor, + then fill the old multi-paragraph editor with the same text. Leave + perCharacter off for both. Native text insertion must preserve + Unicode, newlines, and literal markup without hundreds of key events.

+
Exact caption (manual baseline: copy and paste into both editors)
+ +
+ +
OLD first paragraph
OLD second paragraph
OLD third paragraph
+ +
+ + +
+ + + +
+ + +

Node-ID conversion failure is fault-injected by the Node unit tests; this page + checks the real file contents and native upload event.

+ +
+ + -- cgit v1.2.3