Should textformatupdate be fired with empty formats array when EditContext is deactivated?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 48
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Usually, when a composition is ended, textformatupdate is fired with an empty array of formats.
However, if an EditContext is deactivated while there is a composition happening (e.g. by calling blur() on the associated element) then just a compositionend event is fired and there is no textformatupdate (https://w3c.github.io/edit-context/#dfn-deactivate-an-editcontext). So web apps may end up with leftover styling from the composition after it has ended, unless they explicitly clear the formatting in the compositionend handler. So I think it would be better to also fire a textformatupdate with an empty array of TextFormats in deactivate-an-editcontext (if there is an active composition and it has text formatting).
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
Read the deactivate-an-editcontext definition in the linked EditContext specification and compare its current event behavior with the issue's composition scenario. Confirm whether an active, formatted composition should also produce textformatupdate with an empty TextFormats array, and update the specification so the deactivation behavior is explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100