Skip to content

Ignore mouse events without any button state changes #343

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 1 commit into from
Aug 12, 2021

Conversation

henryksloan
Copy link
Contributor

@henryksloan henryksloan commented Aug 12, 2021

Fixes #291

  • translate_mouse_event returns an option, returning None when no mouse button state changes
  • Only generate mouse press/released messages when translate_mouse_event returns Some(...)

This change is Reviewable

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 19cca2e
Status: ✅  Deploy successful!
Preview URL: https://1d3497b2.graphite-master.pages.dev

View logs

@Keavon Keavon merged commit da77820 into master Aug 12, 2021
@Keavon Keavon deleted the fix-mouse-warning branch August 12, 2021 05:26
@Keavon
Copy link
Member

Keavon commented Aug 12, 2021

Reverting this because, after consulting further with @TrueDoctor, this actually covers up the warning rather than solving its root cause. This may be fixed in #124 which I'll try and work on tonight.

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.

Fix console warning when releasing a mouse press inside the canvas started outside
2 participants