WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
304143
Adding an empty span to an otherwise empty editable element, makes the element unselectable
https://bugs.webkit.org/show_bug.cgi?id=304143
Summary
Adding an empty span to an otherwise empty editable element, makes the elemen...
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
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-12-21 08:15:10 PST
<
rdar://problem/166975434
>
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