-
Notifications
You must be signed in to change notification settings - Fork 604
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
Browser zooms cause issues with mouse xy positions #1048
Comments
Tyler Hall dixit:
- in console enter: ```document.body.style.zoom = "80%"```
Isn’t that what Firefox has been warning of since years already,
that the “nōn-standard zoom property” will not be supported or
something?
|
This happens on older IE versions as well as some Firefox. If you mash ctrl +/- with chrome this will happen sometimes as well. It's hard to get it in that state but I have a couple of times. This snippet was to force the case in which you can see it but it is also used by some other libraries and chrome plugins (not that I can control what everyone does for zoom). Other libraries do support zooming. Thought it would be an issue to bring up. |
Tyler Hall dixit:
This happens on older IE versions as well as some Firefox. If you mash
ctrl +/- with chrome this will happen sometimes as well. It's hard to
get it in that state but I have a couple of times.
Ah, okay.
|
Some browser's zoom behavior makes the x/y mouse position thrown off. When programmatically changing the zoom it looks like the canvas offset gets thrown off of the x/y and will cause hover and button clicks to be left/right depending on the zoom amount.
You can see this on any of the demos.
document.body.style.zoom = "80%"
If there is a workaround for this, would be great.
The text was updated successfully, but these errors were encountered: