Skip to content

Clicking a pinned element should unpin it #2300

Open
@mootari

Description

@mootari

Users can sticky a pointer selection by clicking. However, to unsticky it again they have to click outside the currently rendered mark elements:

if (state.sticky && state.roots.some((r) => r?.contains(event.target))) return; // stay sticky

I frequently find myself stumbling over this behavior since I intuitively treat pinning as a toggle. If technically feasible I believe it would be preferable if any click, even on the mark itself, would unpin the selection.

Is the current implementation meant to handle cases where a user interacts with the pinned mark, like clicking a link or selecting text?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions