RESOLVED FIXED 148532
Selection has extra ClientRects at the end/beginning of some lines
https://bugs.webkit.org/show_bug.cgi?id=148532
Summary Selection has extra ClientRects at the end/beginning of some lines
Steve
Reported 2015-08-27 10:45:27 PDT
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)
Attachments
Repro (1.58 KB, text/html)
2015-08-27 10:45 PDT, Steve
no flags
Radar WebKit Bug Importer
Comment 1 2015-09-09 15:38:25 PDT
Brent Fulgham
Comment 2 2015-11-30 16:44:20 PST
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.
Brent Fulgham
Comment 3 2015-11-30 16:45:00 PST
Ahmad Saleem
Comment 4 2022-07-28 14:29:11 PDT
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!
Vitor Roriz
Comment 5 2022-08-15 09:42:53 PDT
EWS
Comment 6 2022-08-17 13:37:56 PDT
Committed 253536@main (b9508a969a49): <https://commits.webkit.org/253536@main> Reviewed commits have been landed. Closing PR #3312 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.