GithubHelp home page GithubHelp logo

Comments (8)

tombigel avatar tombigel commented on May 28, 2024

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.

PoyangLiu avatar PoyangLiu commented on May 28, 2024

Yes, we saw this with a Wacom device.

from detect-zoom.

m-abs avatar m-abs commented on May 28, 2024

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.

tombigel avatar tombigel commented on May 28, 2024

@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.

tombigel avatar tombigel commented on May 28, 2024

@PoyangLiu I think I fixed it, please check version 1.0.4 and close the issue if things work for you

from detect-zoom.

rocker1976 avatar rocker1976 commented on May 28, 2024

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.

m-abs avatar m-abs commented on May 28, 2024

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.

rocker1976 avatar rocker1976 commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.