[Webkit-unassigned] [Bug 277954] New: contenteditable + getBoundingClientRect() does not return the correct result

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 12 09:00:59 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=277954

            Bug ID: 277954
           Summary: contenteditable + getBoundingClientRect() does not
                    return the correct result
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon.fraser at apple.com

>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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240812/ab890f73/attachment.htm>


More information about the webkit-unassigned mailing list