Bug 304143

Summary: Adding an empty span to an otherwise empty editable element, makes the element unselectable
Product: WebKit Reporter: michael
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: megan_gardner, rniwa, wenson_hsieh
Priority: P2    
Version: Safari 26   
Hardware: Mac (Apple Silicon)   
OS: macOS 26   

michael
Reported 2025-12-14 08:14:36 PST
CONTEXT: As an editor developer I need a way to position popovers relative to a collapsed cursor. That's why I'm rendering an additional span at the cursor position with an anchor-name, so I can use CSS anchor positioning to position a popover/prompt (e.g. for adding a new link). BUG: With the extra span in place, in Safari the field(s) are no longer selectable. In Chrome and Firefox it works just fine. See Repro: https://w3c.github.io/editing/repros/516.html Please read the original issue/discussion for context: https://github.com/w3c/editing/issues/516 W3C Editing TF Call 2025-12-11: > 08:24 johanneswilm: Michael will upload a video. we'll keep the Agenda+ and see if we have an idea for a cleaner solution > 08:24 Michael: ideally — would want to anchor to the selection > 08:24 (similar to how you want to anchor to a DOM node) > 08:25 johanneswilm: might take a while to develop exactly what CSS anchor positioning relative to selection would look like. seems interesting to pursue > 08:25 johanneswilm: let's see if opacity: 0 is a viable workaround
Attachments
Note You need to log in before you can comment on or make changes to this bug.