Skip to content

Prevent user selection to trigger pointer events #600

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

Merged
merged 3 commits into from
May 30, 2025

Conversation

mickael-menu
Copy link
Member

This will prevent the pointer events from being reported (and tap events to be recognized) if the user is currently selecting text.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prevents pointer events from being reported when the user is actively selecting text.

  • A new global flag (isSelecting) is introduced to track text selection state.
  • A listener for "selectionchange" updates the flag and pointer events are cancelled accordingly.

@mickael-menu mickael-menu merged commit e296dc1 into develop May 30, 2025
5 checks passed
@mickael-menu mickael-menu deleted the fix/epub-selection branch May 30, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant