document.body.clientHeight reports incorrect height in emulation mode
Reported by
w...@distortedlogic.co.uk,
Mar 31 2016
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 Steps to reproduce the problem: 1. Opens dev tools on www.google.com 2. Emulate device with a bigger emulation area than the scaled emulated window 3. run 'document.body.clientHeight' in the console What is the expected behavior? 'document.body.clientHeight' should match the emulated height at all times What went wrong? With a bigger emulation area than the scaled emulated window document.body.clientHeight' is one less than the emulated height. Did this work before? Yes Before the new dev tool emulation windwo Chrome version: 49.0.2623.87 Channel: stable OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 21.0 r0 A smaller emulated area than the scaled emulated window 'document.body.clientHeight' reports the correct height
,
Apr 4 2016
Interesting... Do you have a zoom set in DevTools (try Cmd+0 to reset it)?
,
Apr 5 2016
Yes I do, but that doesn't seem to be the problem it occurs after I reset it. Looking closer at it, it seems to happen when you switch between custom sizes.
,
Apr 5 2016
I think this is a rounding issue due to 49% zoom. That's definitely a bug, but meanwhile try 50% zoom as a workaround.
,
Apr 6 2016
,
Jun 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/128414e543648a361e5791cde27e11f6d399d19a commit 128414e543648a361e5791cde27e11f6d399d19a Author: dgozman <dgozman@chromium.org> Date: Mon Jun 20 20:26:08 2016 [DevTools] Try to adjust device mode scale to avoid rounding errors. If not possible, fallback to faithful emulation with correct size. BUG= 599511 Review-Url: https://codereview.chromium.org/2020083004 Cr-Commit-Position: refs/heads/master@{#400764} [modify] https://crrev.com/128414e543648a361e5791cde27e11f6d399d19a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
,
Jun 20 2016
Should be fixed in M53.
,
Aug 26 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by kozyatinskiy@chromium.org
, Apr 4 2016Status: Assigned (was: Unconfirmed)