NEW178242
Inconsistent position of text caret when focusing on an empty element
https://bugs.webkit.org/show_bug.cgi?id=178242
Summary Inconsistent position of text caret when focusing on an empty element
Nikita Vasilyev
Reported 2017-10-12 16:07:13 PDT
Created attachment 323585 [details] [HTML] Reduction Steps: 1. Open the attached reduction. 2. Press Tab to focus on the first contentEditable element. 3. Press Tab again to focus on the next contentEditable element. Expected: Text caret should be in the middle of the focused element for both elements. At very least, it should be consistent. Actual: Text caret is positioned slightly differently for each contentEditable element. Notes: I've noticed this peculiar behavior in Web Inspector https://bugs.webkit.org/show_bug.cgi?id=177313#c14.
Attachments
[HTML] Reduction (478 bytes, text/html)
2017-10-12 16:07 PDT, Nikita Vasilyev
no flags
[Image] Issue - Caret placement (7.96 KB, image/png)
2017-10-12 16:08 PDT, Nikita Vasilyev
no flags
Nikita Vasilyev
Comment 1 2017-10-12 16:08:40 PDT
Created attachment 323587 [details] [Image] Issue - Caret placement The first text caret is 1px off to the left.
Myles C. Maxfield
Comment 2 2017-10-12 17:19:48 PDT
Seems like this only occurs with retina screens. This is probably due to pixel snapping the caret. The font is monospace, but there is no guarantee that each character will have an integral width.
Note You need to log in before you can comment on or make changes to this bug.