WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
277954
contenteditable + getBoundingClientRect() does not return the correct result
https://bugs.webkit.org/show_bug.cgi?id=277954
Summary
contenteditable + getBoundingClientRect() does not return the correct result
Simon Fraser (smfr)
Reported
2024-08-12 09:00:59 PDT
From
https://developer.apple.com/forums/thread/761853
: If a sufficiently long text in an HTML tag leads to a text wrap, the calculated values (y and width) of getBoundingClientRect for characters or words directly after the wrap are not correct, if the element or one of a parent is contenteditable="true" the y value has the value as if it were still before the break the width value spans the entire width, Here a code that reproduces this failure:
https://stackblitz.com/edit/vitejs-vite-jwghts?file=src%2Fmain.ts,src%2FcalcLetterRects.ts,src%2Fstyle.css
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-08-12 09:01:20 PDT
<
rdar://problem/133689169
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug