-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Window mousedown/mouseup events no longer fire in Chrome #4768
Comments
Related #4767? |
Is this related to #4126? |
Chrome added support for pointerevents, which Edge and IE11 already have. I wouldn't be surprised to see Firefox introduce them as well. We already support pointerevents to be able to support touch (and pen) interactions in IE & Edge, so Cesium listens for and handles the pointerevents. Unfortunately this means your old The correct solution is to use The browser is still willing to fire old mousedown events for non-Cesium elements on the page, but only because those elements don't have pointer event handlers wired up to them. We can't offer that to apps that want raw mouse interactions on the Cesium canvas itself, since we already made the jump to pointer events. Long story short: Upgrade your app's event handling. Use the ScreenSpaceEventHandler or another polyfill, or roll your own event handling that includes pointer events, but don't just bind to old-school mousedown and expect the Cesium canvas to fire that, it's obsolete. |
I strongly recommend users always use https://github.com/jquery/PEP in any Cesium application, this will enable pointer events in all browsers for consistent behavior. Cesium can't do this itself since we don't want to pollute the global namespace. I recommend against using |
I have no problem recommending PEP over
It does have a few warts as well, for example it registers and prevents default even on unhandled actions. But ever since it added support for pointer events, it became valuable in its own right, more than just a simple polyfill, and I think it's wrong to mark it private or try to steer users away from it. |
@emackey while I agree with you, my longer-term goal is actually to make |
Window mousedown/mouseup events no longer fire in Chrome 55. I also tested Canary with the same result.
The events do fire in Firefox.
This is not a new issue in Cesium; I tested Cesium 1.28, 1.25, and 1.20 with the same results.
@emackey any idea? Is this a new Chrome bug? Or a fix to Chrome that revealed a bug in Cesium? Sandcastle specific (I also tested in a new window).
The text was updated successfully, but these errors were encountered: