Should beforeinput and input always come together?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 202
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
The Input Events specification [1] currently reads:
Input events are sent before (beforeinput event) and after (input event) a user attempts to edit the markup.
The UI Events specification [2] currently says on beforeinput:
A user agent MUST dispatch this event when the DOM is about to be updated.
Notice the word "attempts" - which can be read as that these events should be triggered if the user attempts to do something even if that something is impossible (such as undo when the undo stack is empty). This formulation seems to say that each beforeinput event should be followed by an input event - unless the beforeinput event has been cancelled.
Testing of the implementation Chrome shows that it has been implemented differently. Beforeinput events for actions that cannot actually be executed are not followed by an input event. See https://wpt.fyi/results/input-events/input-events-typing.html?label=experimental&label=master&aligned
The question is: Do we want the current behavior or do we want beforeinput/input to always come in pairs?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the Input Events and UI Events specification sections linked in the issue with the behavior shown by the WPT input-events/input-events-typing.html results. Decide whether impossible editing attempts should produce paired beforeinput and input events, then update the relevant specification wording and verify that it matches the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100