Bug 251681 - list-style-position:inside causing a cursor positioning issue for contenteditable="true"
Summary: list-style-position:inside causing a cursor positioning issue for contentedit...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac (Apple Silicon) macOS 13
: P2 Minor
Assignee: Nobody
URL: https://jsfiddle.net/wvz698b4/show
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-03 05:46 PST by John Flockton
Modified: 2023-02-10 05:47 PST (History)
9 users (show)

See Also:


Attachments
Illustrative example (192.07 KB, image/png)
2023-02-03 05:46 PST, John Flockton
no flags Details
test case (441 bytes, text/html)
2023-02-09 00:09 PST, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Flockton 2023-02-03 05:46:04 PST
Created attachment 464821 [details]
Illustrative example

1. Open the below in a Safari browser:

```
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>List style position bug</title>
  </head>
  <body>
    <div contenteditable="true">
      <ul style="list-style-position: inside">
        <li>First list item</li>
        <li></li>
      </ul>
    </div>
  </body>
</html>
```

2. Place your text cursor in the second bullet. 
3. Notice that the cursor is incorrectly positioned before the bullet point.
Comment 1 Ahmad Saleem 2023-02-06 16:31:40 PST
I am able to reproduce this bug in Safari 16.3 and WebKit ToT using Comment 0 test case. I changed it to JSFiddle and added link of it to URL field.

Although I noted that all other browsers (Chrome Canary 112 and Firefox Nightly 111) also show caret before bullet point, so I think all browsers are matching each other and it might be not a bug as such.
Comment 2 Karl Dubost 2023-02-09 00:09:24 PST
Created attachment 464919 [details]
test case

The test case as submitted in the description.
Comment 3 Karl Dubost 2023-02-09 00:12:15 PST
Yes confirmed that all browsers are behaving exactly the same here. As soon as we start typing the cursor is going where the text should begin.

As such it is not a browsercompat issue at least
Comment 4 Radar WebKit Bug Importer 2023-02-10 05:47:19 PST
<rdar://problem/105271519>