Skip to content
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

Mousemove fires outside canvas #12473

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Riley-Howley
Copy link

@Riley-Howley Riley-Howley commented Feb 10, 2025

Description

Fixes Issue: #12373
This PR addresses adding a bounds check on the ScreenSpaceEventHandler handleMouseMove this issue was only reproducible in Firefox. Checking to make sure the client is inside the bounds of the canvas solves this issue

When integration Cesium in existing application, if menus are overlayed on the canvas then in firefox the event is triggered even though its not in the canvas

Issue number and link

#12373

Testing plan

Using the given example in the Issue, after my change I tested in Firefox, and Chrome. Note: I did this on a Mac.

Automated tests were updated to have a valid boundingClientRect so that it passes the new check. Also added a new test to ensure the event is not fired when in the bounds of the canvas

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

…o pass the bounds check. Then added a new test to check that the mouse move action was not called
Copy link

Thank you for the pull request, @Riley-Howley!

✅ We can confirm we have a CLA on file for you.

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