Created attachment 463752 [details] The HTML file to reproduce this bug ## Bug description On iOS Safari, when I have multiple paragraphs in a `<div contenteditable="true">` element, double-spaces to insert a period doesn't work well. ## Reproduce steps - Use a web server to serve the `index.html`. You can find the source code of `index.html` at this [link](https://gist.github.com/ocavue/8d4139c40096cfa08780dc6d18f30e1c). - Open this file with Safari on macOS and iOS. - Put the cursor at the end the first `paragraph element.`. - Type a space, then a word, then two spaces. ## Expected behavior Double-pressing spaces to period works in both blue and red area. ## Actual behavior iOS Safari only works in the blue area. Mac Safari works on both two areas. Particularly, on iOS, the first and second paragraph doesn't work, but the third (last) paragraph works well. The following two videos show the behavior on iOS and on macOS. https://user-images.githubusercontent.com/24715727/204239949-247aee00-3abc-418a-ab1b-f1aa02faa4db.MP4 https://user-images.githubusercontent.com/24715727/204240408-c92e569c-ca59-428b-a657-7e6d11c93b20.mp4 ## Version - iOS: 16.1.1 - macOS: 12.6; Safari Version 16.1 (17614.2.9.1.13, 17614)
<rdar://problem/102973289>