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

Doesn't work in Safari #2

Open
jasonbarry opened this issue Jan 14, 2020 · 4 comments
Open

Doesn't work in Safari #2

jasonbarry opened this issue Jan 14, 2020 · 4 comments

Comments

@jasonbarry
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Doesn't work in Safari

What is the expected behavior?
I'd expect it to work in Safari

Which versions of zoom-level, and which browser / OS / node version are affected by this issue? Did this work in previous versions of zoom-level?
I'm testing on https://841ns.csb.app in Safari 13.0.4 on Mac 10.14.6. Nothing happens when I zoom in or out of the page, even after clicking the Recalc button. Works as expected in Chrome.

@xobotyi
Copy link
Owner

xobotyi commented Jan 14, 2020

I'm not able to investigate it because I have no macos based devices.

@jasonbarry
Copy link
Author

@xobotyi the problem is that in Safari, devicePixelRatio doesn't change when you zoom in and out. It is instead used to refer to the constant hardware pixel density of the screen – for example, on my Retina MacBook Pro, the value is always a constant 2. On older non-Retina devices, the value is 1. The newest iPhone 11 Pro has a devicePixelRatio of 3.

@hsh2001
Copy link

hsh2001 commented May 25, 2020

Same. Why don’t you detect touch start/move to check zoom gestures for iOS Safari?

@xobotyi
Copy link
Owner

xobotyi commented May 25, 2020

@hsh2001 because it is impossible to detect zoom level this way, only the fact that pitch has occurred

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

No branches or pull requests

3 participants