Created attachment 462125 [details] 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)
Created attachment 462129 [details] Screenshot
Created attachment 462137 [details] rendering in Safari, Safari TP, firefox, chrome Tested on macOS 13.0 --- Safari 16.1 18614.2.1.1.1 Safari Technology Preview 16.0 18615.1.2.3 Firefox Nightly 106.0a1 10622.9.1 Google Chrome Canary 107.0.5280.0 5280.0
<rdar://problem/99557958>