Created attachment 260069 [details] Repro Steps to reproduce: 1. Open this page in Safari: https://jsfiddle.net/3s6rpy8r/embedded/result/ 2. Click the 'C' in the contenteditable region 3. Tap the RIGHT keyboard arrow key repeatedly to move the caret through the text 4. Notice when the caret is at the end of a line the ClientRects length is 2 (doesn't happen on the last line) 5. Notice when the caret is at the start of a line the ClientRects length is 2 (doesn't happen on the first line)
<rdar://problem/22634654>
It looks like the W3C standard for getClientRects is not yet finalized, so there is no consensus on how this should work. For now, Chrome and Safari agree on the behavior. We should revisit this once the behavior is standardized.
See <http://www.w3.org/TR/cssom-view>
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 and it shows "ClientRects.length" (2) while end and start of the line while all other browsers (Chrome Canary 106 and Firefox Nightly 105) only show '1'. Thanks!
Pull request: https://github.com/WebKit/WebKit/pull/3312
Committed 253536@main (b9508a969a49): <https://commits.webkit.org/253536@main> Reviewed commits have been landed. Closing PR #3312 and removing active labels.