Skip to content

Clicking a pinned element should unpin it #2300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mootari opened this issue Mar 15, 2025 · 1 comment
Open

Clicking a pinned element should unpin it #2300

mootari opened this issue Mar 15, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@mootari
Copy link
Member

mootari commented Mar 15, 2025

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?

@mootari mootari added the enhancement New feature or request label Mar 15, 2025
@Fil
Copy link
Contributor

Fil commented Mar 15, 2025

related #1832 #2298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants