Skip to content

Safari Desktop: Adding an empty span to an otherwise empty editable element, makes the element unselectable #516

@michael

Description

@michael

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

CONTEXT:

Behavior of empty fields broken on Safari at https://svedit.dev (v0.5.0)

bug.mov

Popovers anchored at selection highlight span, using CSS Anchor positioing:

create-link-popover-ew.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reports-filedNon-spec-compliant behavior confirmed. Reported to relevant browser vendor's bug trackers.caret-movement

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions