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.
The issue is also posted in WHATWG: whatwg/html#10337