Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for event ordering when inserting replacement text such as text prediction, spell checker, etc #10337

Open
siliu1 opened this issue May 8, 2024 · 0 comments

Comments

@siliu1
Copy link

siliu1 commented May 8, 2024

What is the issue with the HTML Standard?

writingsuggestions and spellcheck are attributes that control UA-provided writing assistance such as text prediction and spell checker. When user accepts a suggestion/correction, wrong order of events fired might confuse online editors which may produce unexpected results.

Here is a proposal that the order of events when inserting suggestions text:

Order: Eventtype inputType
1 beforeinput insertReplacementText
2 input insertReplacementText

The beforeinput event is cancelable. If it's cancelled, suggestion insertion should be aborted, and no input event is fired.

Composition events are not necessary therefore shouldn't be fired when inserting suggestions/corrections.

The proposal also applies to other suggestion insertions such as auto-correct, etc.

@sanketj sanketj added agenda+ To be discussed at a triage meeting and removed agenda+ To be discussed at a triage meeting labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants
@sanketj @siliu1 and others