Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: duplicated newlines when using dictation on iOS 18+.
This fixes a bug that started to happen with iOS 18, where you would get duplicated newlines after completing the dictation. The bug happens because, upon dictation completion, iOS sends the sequence of `beforeinput` events very quickly. With the `insertParagraph` ones, it can happen that the internal document range fails to update, resulting in duplicated newlines and missed content. This workaround is necessary due to the inability to distinguish text entered in dictation mode, as iOS WebKit doesn’t trigger composition events during dictation (https://bugs.webkit.org/show_bug.cgi?id=261764).
- Loading branch information