[Webkit-unassigned] [Bug 244780] New: Position styles cause empty range selection highlighting to appear between nodes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 4 12:24:57 PDT 2022


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

            Bug ID: 244780
           Summary: Position styles cause empty range selection
                    highlighting to appear between nodes
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Minor
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: j.r.flockton.work at gmail.com

Created attachment 462125

  --> https://bugs.webkit.org/attachment.cgi?id=462125&action=review

Minimal reproducible example

This was originally reported in a separate OSS issue report for our Rich Text Editor: https://github.com/facebook/lexical/issues/2797.

In the attached minimal reproducible example index.html, the issue should be immediately visible.

Repro steps:

1. Open the attached index.html in Safari 15.
2. Observe that the range selection highlighting is visible between both paragraph elements.
3. Remove the "position: relative" styling from both paragraphs on line 10.
4. Reload the page.
5. Observe that the range selection highlighting is no longer visible.

Even though the DOM range selection is uncollapsed, I would expect it to appear collapsed (regardless of whether or not a "position" style is defined on the nodes) as the anchorNode offset is the length of the anchorNode, and the focusNode has an offset of 0. This is the case on Chromium and Firefox.

Let me know if you need any more information.

Version info:
MacOS 12.5.1
Safari 15.6.1 (17613.3.9.1.16)

-- 
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/20220904/7ad780ae/attachment.htm>


More information about the webkit-unassigned mailing list