-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 `insertParagraph` events and shifts the range offset to the next line, resulting in duplicated newlines. This patch ignores these events unless triggered by an Enter keypress. 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
1 parent
e597bc4
commit 237205b
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters