Skip to content

Clicking a pinned element should unpin it #2300

Open

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?

Activity

  1. added
    enhancement
    on Mar 15, 2025
  2. Fil commented on Mar 15, 2025

    @Fil
    Contributor

    related #1832 #2298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions