Comments (8)
Which kind of device you are talking about? Will I see it with a Wacom device attached ?
—
Sent from Mailbox for iPhone
On Thu, Mar 7, 2013 at 11:11 PM, Jay [email protected] wrote:
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?
Reply to this email directly or view it on GitHub:
#34
from detect-zoom.
Yes, we saw this with a Wacom device.
from detect-zoom.
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:
Primary monitor is the built-in pointer-screen (like a touchscreen just with pointer) with a 1280x800 resolution.
Secondary monitor is a normal screen with a 2048x1152 resolution.
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.
Unfortunately that function uses window.screen to do it's calculation, in this case window.screen is the primary screen and not the secondary screen that the browser-window is actually on. And since the two screen have different resolutions, the calculation is wrong.
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).
from detect-zoom.
@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
from detect-zoom.
@PoyangLiu I think I fixed it, please check version 1.0.4 and close the issue if things work for you
from detect-zoom.
Hello.
Thanks for your help with detect-zoom :)
I'm checking your detect-zoom.js in Chrome version 26 and works fine. In the current version 27 is not working.
Could you please help with this?
from detect-zoom.
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.
from detect-zoom.
Thanks :)
On Fri, May 24, 2013 at 1:53 PM, Morten Sjøgren [email protected]:
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 https://github.com/rocker1976 See #37https://github.com/tombigel/detect-zoom/issues/37there is new webkit detection function that works on Chrome v27.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-18420034
.
from detect-zoom.
Related Issues (20)
- Pls confirm my fix for failing detection of IE8 HOT 1
- FF 19.0 document.body errors as null. HOT 8
- detectZoom not defined HOT 6
- Not working on latest Webkit Nightlies HOT 12
- Doesn't seem to detect "text only" zoom in Firefox HOT 2
- Doesn't work in Chrome 27 (which is now the current release channel version) HOT 3
- Uncaught TypeError when js included in head (Chrome 27)
- READ THIS: Detect-zoom is currently unusable for desktop HOT 10
- Typo in wiki
- detect-zoom changes zoom when you resize the browser window in Chrome HOT 1
- Incorrect value for zoom inside iframe in Chrome HOT 1
- More Accurate Device Pixel Ratio Function HOT 1
- Idea check the client width of a known Element HOT 1
- Collaboration request HOT 1
- should use screen.width/window.innerWidth for chrome HOT 2
- Firefox new version change default zoom HOT 2
- Wrong .device() on iOS 10
- Polling needed or event model exists?
- typescript version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detect-zoom.