-
Notifications
You must be signed in to change notification settings - Fork 122
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
READ THIS: Detect-zoom is currently unusable for desktop #45
Comments
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/RyUSi3zdumQ is Blink's recent thread discussing means of detecting zoom level and standardizations of such. |
Thanks @paulirish |
Hi Tom, do you have any updates? I may not understand the Firefox issue correctly, is the zoom level and device pixel ratio always correct on page load? Does the issue only occur after a manual zoom on the page? If so, why not keep the original values so that you always have the original device pixel ratio. Can you please clarify. Thanks. Daniel. |
Google Drive does also zoom level detection with some proprietary code. The mechanisms it uses seem to be something along these lines:
I hope this helps at improving the detect-zoom plugin, would be really great to have it working correctly! And @paulirish, getting a standard way to detect the zoom levels in browsers would be really useful in complex real-world HTML5 apps, where the browser functionality when zoomed in/out cannot be made reliable in a consistent manner easily (think Google Docs/Drive spreadsheet). |
Does it still actual? Or it's can detect zoom in desktop browsers? |
I'm not sure, I merged some pull requests in the past year but I haven't checked if things work on desktop browsers. Sorry. — On Thu, Jun 11, 2015 at 11:12 AM, Stanislav Sysoev
|
Ok, thanks. I've checked in Chrome and it seems to work. |
Can we update the readme? |
Bump :) |
My employer is currently using this, with #54 merged, on thousands of web sites. Working great! |
Last update: Aug 7 2013
In the past few months both Mozilla and Google made some changes to their browsers that make it almost impossible to do what detect-zoom is here to do:
Firefox
On Firefox 18 Mozilla changes the devicePixelRatio value on manual zoom (cmd/ctrl +/-), making it impossible to know whether the browser is in zoom mode or is it a retina device, ignoring what the word DEVICE represents.
I personally believe someone there refuses to admit this is a mistake and revert this decision.
Chrome
On Chrome 27 (Meaning WebKit and Blink) webkitTextSizeAdjust was deprecated on desktops versions of the browser. This was the only bullet proof way to detect zoom in desktop chrome that I am aware of.
There are couple of other ways, but they don't cover all the bases - one uses SVG but is not working in iFrames, the other uses window.inner/outerWidth and is not working when there is a sidebar or the DevTools are open on the side.
The text was updated successfully, but these errors were encountered: