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

MOUSE_MOVE fires outside of canvas in Firefox #12373

Open
angrycat9000 opened this issue Dec 13, 2024 · 0 comments
Open

MOUSE_MOVE fires outside of canvas in Firefox #12373

angrycat9000 opened this issue Dec 13, 2024 · 0 comments

Comments

@angrycat9000
Copy link
Contributor

angrycat9000 commented Dec 13, 2024

What happened?

Inconsistent behavior of ScreenSpaceEventHandler with MOUSE_MOVE event between Firefox and Chrome.

In Chrome when the mouse moves out of the canvas and over another element the MOUSE_MOVE events stop. In Firefox the MOUSE_MOVE events continue and can have coordinates outside the range of the canvas.

My expectation is that the MOUSE_MOVE event is only triggered while the pointer is moving over the canvas element, and is not fired when the pointer is outside of the canvas.

Screen.Recording.2024-12-13.153041.mp4

Reproduction steps

  1. Open the below sandcastle in Chrome.
  2. Open the Console tab
  3. Move the mouse over the Cesium viewer and then over the red element
  4. Note that the console logs stop when the pointer moves over the red element
  5. Open sandcastle in Firefox
  6. Open the Console tab
  7. Move the mouse over the Cesium viewer and then over the red element
  8. Note that the console logs continue while over the red element, and the y value is negative.

Sandcastle example

https://sandcastle.cesium.com/#c=dVFta8IwEP4roftSQVLGvmktGyJsMHHg5qfCiMlNg+mlJJeKDP/7mlYnOBdIyHP3vFyItOiJNRr24NiEIezZFLwOFV91tbRMZIenFkloBFcmg3GJstNtBSpzLVxKB4DLWkiYNYD03JPSPoR7CQhcCmyEj04nD+6BXrAO9CRJW0y/AnYXlla2gar1GbDvElm3Yro1wI3d/LY5oHqzXkdR9I284/C/od4PNfD54mM5+5wvVrMoSIZJ7ulgoDjHPOqqto5YcCblPCOoaiMIfLYOcgfEpfd90llwZwN5reAyKWO1UErjZsQeHFTjS30t5G7jbEA1cqC6xrHv5tl5jFzphmk1KZOTcZkU8/a9rN2O0RYcxBN7HGGetZLTAy7qP19Y3OYZK+Ksi9bNiEOkbe+L177IOc+zFt5WkrVmLa6dfwA

Environment

Browser:

  • Chrome 131.0.6778.140
  • Firefox 133.0.3
    CesiumJS Version: 1.124
    Operating System: Windows 11 Enterprise 22631.4602
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant