detect-zoom icon indicating copy to clipboard operation
detect-zoom copied to clipboard

Invalid zoom level in FF 18.0.2 for Mac with retina display

Open zdmytriv opened this issue 12 years ago • 5 comments

At 100% zoom I'm getting:

Current zoom level: 2.00 Device Pixel Aspect Ratio: 2.00 Screen Shot 2013-02-17 at 12 12 06 AM

zdmytriv avatar Feb 16 '13 22:02 zdmytriv

I know. I also mention it in the readme - Mozilla's implementation makes it impossible (at least until someone finds a workaround) to defer between zoom level and devicePixelRatio.

I'm still pondering about this issue...

Sent from my iPhone

On Feb 17, 2013, at 0:13, zdmytriv [email protected] wrote:

At 100% zoom I'm getting:

Current zoom level: 2.00 Device Pixel Aspect Ratio: 2.00

— Reply to this email directly or view it on GitHub.

tombigel avatar Feb 16 '13 23:02 tombigel

Is there any other way to detect that it is a retina screen? I suppose you could then expect the zoom to come out as 2.00 and then adjust it behind the scenes back to 1.0 and thus only if the zoom reads more or less than 2.0 would it have a non 1.0 zoom.

Just thinking out loud here. I sadly don't have a retina display to test with, or I would try and figure out a way around the issue since the FF devs are being pretty stubborn here: https://bugzilla.mozilla.org/show_bug.cgi?id=809788

Sembiance avatar Feb 27 '13 19:02 Sembiance

yeah, I know. comments 22 and 24 there are mine...

On Feb 27, 2013, at 21:19 , Robert Schultz [email protected] wrote:

Is there any other way to detect that it is a retina screen? I suppose you could then expect the zoom to come out as 2.00 and then adjust it behind the scenes back to 1.0 and thus only if the zoom reads more or less than 2.0 would it have a non 1.0 zoom.

Just thinking out loud here. I sadly don't have a retina display to test with, or I would try and figure out a way around the issue since the FF devs are being pretty stubborn here: https://bugzilla.mozilla.org/show_bug.cgi?id=809788

— Reply to this email directly or view it on GitHub.

tombigel avatar Feb 27 '13 19:02 tombigel

detect-zoom FYI - This issue is occurring for me with Chrome Version 25.0.1364.172 m on a Dell U2711 monitor with Windows 7. DPI is 109ppi with an overall resolution of 2560x1440. Firefox works fine for me; I tested 16.0.1, 18.0.1 and 19.0.2.

GrooveStomp avatar Mar 16 '13 20:03 GrooveStomp

In the latest firefox you want to make this change

@@ -189,8 +189,9 @@
      * @private
      */
     var firefox18 = function () {
+        var zoom = Math.round(((window.outerWidth) / window.innerWidth)*100) / 100;
         return {
-            zoom: firefox4().zoom,
+            zoom: zoom,
             devicePxPerCssPx: devicePixelRatio()
         };
     };

taf2 avatar Oct 27 '14 19:10 taf2