-
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
Invalid zoom in Chrome when touch/pen/tablet input devices is plugged into a desktop/laptop computer #34
Comments
Which kind of device you are talking about? Will I see it with a Wacom device attached ? On Thu, Mar 7, 2013 at 11:11 PM, Jay [email protected] wrote:
|
Yes, we saw this with a Wacom device. |
Incorrect zoom-level detection for chrome on multiscreen setup We're having a similar problem. We're using detect-zoom v1.0.2 on http://www.heste-nettet.dk and we've encountered a bug with Chrome. A laptop PC with the following setup returns a incorrect (too-low) zoom-level: The PC is running Windows 7. Chrome is started from the primary screen but opens on the secondary screen and our site i the homepage. And just after load the zoom-level is detected to be 0.625 event though Chrome says it's at 100% and we need to zoom to ~175% because zoom-level is detected to be over 1. I ran some debugging on the library and I can see that it detects that the “ontouchstart”-event exists and the function webkitMobile therefor is used to detect the zoom-level. NOTE: It's important that it's the first page being opened, as switching page resolves the problem. In our case we don't need detection on mobile devices so we've commented it out in our version, so the webkitMobile function isn't used anymore and we've added checks, so iPad/iPhone and Android browser don't use detect-zoom anymore (our warning doesn't make sense in those cases). |
@m-abs About the multiple screens - This requires tests that I'm not able to do right now.. I'm on a Mac with 2 screens but none of them is some form of "retina". Will revisit it when I'll be able to or when someone offers a fix |
@PoyangLiu I think I fixed it, please check version 1.0.4 and close the issue if things work for you |
Hello. |
Sorry I didn't get back to you. It looks like the newest version is detecting Chrome correctly on the laptop I described earlier. @rocker1976 See #37 there is new webkit detection function that works on Chrome v27. |
Thanks :) On Fri, May 24, 2013 at 1:53 PM, Morten Sjøgren [email protected]:
|
When the touch/pen/tablet input devices is plugged in and drivers installed, the detect-zoom.js interpret the current desktop computer as a mobile device because of the ontouchstart event. The _zoomWebkitMobile() is reported instead of _zoomWebkit().
When this happens, the zoom level is only correct when the browser is maximized with nothing obscuring the borders (such as the height or width of a windows taskbar).
Should I suggest that a better user agent sniffing code be used to detect 'mobile' devices?
The text was updated successfully, but these errors were encountered: