Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dictation on iOS does not trigger composition events (https://bugs.webkit.org/show_bug.cgi?id=261764). Instead, it triggers `beforeinput` events with `insertText`. During the dictation phase, it keeps the range anchored to the cursor, and iOS may modify past text as new text adds context. Once dictation is stopped, it starts sending `insertText` events with word fragments. When a past fragment is altered, iOS sends a `beforeinput` event where `inputType` is null. In this case, perform a synchronous render operation to set the editor to the correct state. Otherwise, scheduled render requests can process invalid ranges and mess with the editor contents.
- Loading branch information