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

Incorrect browser zoom under MSIE9 and zoom set to 105% or 110%

Open jkronegg opened this issue 12 years ago • 0 comments

When setting the zoom value to 105% or 110% under MSIE9, detect-zoom will give a value of 1.04... and 1.09... respectively. The expected values are 1.05 and 1.1 respectively.

In order to correct these values, I suggest to replace line 59:

var zoom = screen.deviceXDPI / screen.logicalXDPI;

by:

var zoom = Math.floor(screen.deviceXDPI*100 / screen.logicalXDPI + 0.9) / 100;

jkronegg avatar Nov 20 '12 12:11 jkronegg