- From: Michael Aufreiter <notifications@github.com>
- Date: Sun, 14 Dec 2025 07:39:34 -0800
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 14 December 2025 15:39:38 UTC
michael left a comment (w3c/editing#504)
I'll try to summarize the state of the discussion here, please correct me where I'm wrong:
There's two conflicting interpretations at the moment:
1) execCommand is considered **a normal user input**, hence onbeforeinput is fired (Safari)
2) execCommand is considered **not a normal user input**, hence no onbeforeinput is fired (Chrome, Firefox)
Considerations / Use Cases:
- execCommand is currently used for testing (WPT), which would assume it behaves like a normal user input
- if we decided that execCommand should not trigger input events, there should be some other documented way how to trigger events programmatically (for testing)
- Which behavior would an editor developer usually expect? E.g. if they render an undo button which when clicked runs execCommand('undo')?
____
Personally, I was expecting that triggering an undo programmatically (via execCommand) would result in the exact same behavior as pressing Cmd+Z or clicking Edit>Undo, so I was surprised that Firefox/Chrome did not trigger a 'historyUndo' onbeforinput event.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/504#issuecomment-3651525743
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/editing/issues/504/3651525743@github.com>
Received on Sunday, 14 December 2025 15:39:38 UTC