New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 429140 link

Starred by 5 users

Issue metadata

Status: WontFix
Closed: May 2015
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Sign in to add a comment

JS getBoundingClientRect().width not returing correct value if zoomed

Reported by, Oct 31 2014

Issue description

Version: TOT
OS: All

What steps will reproduce the problem?
1. Open attached test case in Chrome
2. String "World" overlaps with "Hello"

What is the expected output? What do you see instead?
String should not overlap

Please use labels and text to provide additional information.

537 bytes View Download

Comment 1 by, Oct 31 2014

Labels: Cr-Blink-CSS
Value returned by "getBoundingClientRect().width" is same when zoom value is 1 or > 1

Comment 2 by, Oct 31 2014

Labels: -Cr-Blink-JavaScript

Comment 4 by, Nov 6 2014

Labels: Cr-Blink-PageZoom
Summary: JS getBoundingClientRect().width not returing correct value if zoomed (was: JS getBoundingClientRect().width not returing correct value)

Comment 5 by, Nov 14 2014

Related:  Issue 431146 

Comment 6 by, Nov 14 2014

 Issue 431146  has been merged into this issue.
Status: WontFix
Jsfiddle version of test case:

As there is no spec for CSS Zoom it's not clear how it should interact with getBoundingClientRect().

Personally I disagree that zoom should affect the value returned by getBoundingClientRect(). When the browser is zoomed (using Ctrl-Plus/Minus) it does not affect getBoundingClientRect() because these values are typically reused to position/size elements on the page. If they were affected by zoom then things would get double zoomed and pages would break for those that require browser zoom for accessibility.
Usually you use measurements within the same coordinate space. Example:

When you create separate coordinate spaces using zoom on sub elements on the page you should be responsible as the developer for managing the conversion of measurements between them.

Sign in to add a comment