-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Description
In the demo on https://jsonnet.org, if you hit redo/undo for multiple characters, the demo breaks. This seems to be because the browser generates multiple text change events (Chrome 139, MacOS 14.6).
Currently, the implementation of the click handler in aux_demo
does not synchronize to deduplicate these events, resulting in duplicate or untracked tabs being added to the demo. Because aux_demo calls await
(which yields) the DOM call order becomes clear-clear-add-add instead of clear-add-clear-add, resulting in the below behavior.
This can be reproduced by typing two or more keystrokes and then undo (ctrl/cmd + Z).
Example 1
Screen.Recording.2025-09-02.at.8.04.15.PM.mov
Local fix
I confirmed adding synchronization fixes the behavior locally.
Screen.Recording.2025-09-02.at.8.08.57.PM.mov
Example 2
Screen.Recording.2025-09-02.at.8.12.12.PM.mov
Local fix
Screen.Recording.2025-09-02.at.8.12.43.PM.mov
He-Pin
Metadata
Metadata
Assignees
Labels
No labels