Bug 248387 - [iOS] Double-space to insert period is not working in a contenteditable paragraph
Summary: [iOS] Double-space to insert period is not working in a contenteditable parag...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-28 01:30 PST by ocavue
Modified: 2022-12-05 01:31 PST (History)
2 users (show)

See Also:


Attachments
The HTML file to reproduce this bug (762 bytes, text/html)
2022-11-28 01:30 PST, ocavue
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ocavue 2022-11-28 01:30:04 PST
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)
Comment 1 Radar WebKit Bug Importer 2022-12-05 01:31:16 PST
<rdar://problem/102973289>