Issue metadata
Sign in to add a comment
|
getBoundingClientRect gives incorrect values when page zoomed on Chrome for Android
Reported by
ol1...@gmail.com,
Mar 2 2016
|
||||||||||||||||||||||
Issue descriptionChrome Version : 48.0.2564.95 URLs (if applicable) : google.com Broken also on : Chrome v 44.*: FAIL What steps will reproduce the problem? 1. Launch: google.com on the latest version of Chrome on an Android mobile device version 5 or higher. 2. Zoom in (on the website) so that the viewport displays the page in a scrolled position. 3. USB debug, using chrome on desktop with: chrome://inspect tool 4. In console, run: > var el = document.getElementById('tmsb'); > el.getBoundingClientRect().top; What is the expected result? Get the accurate element position in the viewport. What happens instead? Incorrect values - same result with different scroll positions (Attached).
,
Mar 7 2016
,
Mar 7 2016
,
Mar 7 2016
This is actually not a dup. getBoundingClientRect has been returning values relative to the layout viewport since M41 and this is to match client coordinates in Mouse/Touch events. It wasn't changed as part of the inert visual viewport work and this is working as intended. IIRC, edge browser does the same thing here but I don't have a device to test on at the moment. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kavvaru@chromium.org
, Mar 3 2016