HTMLInputElement#scrollLeft returns wrong value when using browser zoom
Reported by
vmuhac...@gmail.com,
Oct 2 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 Steps to reproduce the problem: https://jsfiddle.net/dn45k2wg/ 1. Create an html file with: <style> #div, #input { font: inherit; padding: 0px; margin: 0px; border: 1px solid silver; width: 50px; display: inline-block; overflow: hidden; vertical-align: middle; white-space: nowrap; background: white; } th { text-align: left; } </style> <div id="div">0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF</div> <input type="text" id="input" value="0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF" /> <table id="log"></table> <script> var div = document.getElementById("div"); var input = document.getElementById("input"); var log = document.getElementById("log"); window.setInterval(function () { div.scrollLeft = 10000; input.scrollLeft = 10000; log.innerHTML = "<tr><th>div.scrollLeft</th><td>" + div.scrollLeft.toFixed(3) + "</td></tr>" + "<tr><th>input.scrollLeft</th><td>" + input.scrollLeft.toFixed(3) + "</td></tr>" + "<tr><th>(div.scrollLeft / input.scrollLeft)</th><td>" + (div.scrollLeft / input.scrollLeft).toFixed(3) + "</td></tr>" + "<tr><th>window.devicePixelRatio</th><td>" + window.devicePixelRatio.toFixed(3) + "</td></tr>"; }, 1000); </script> 2. Open in Chrome on Windows (note: cannot reproduce on other systems). 3. Try to use the browser zoom. What is the expected behavior? What went wrong? HTMLInputElement#scrollLeft returns wrong value when using browser zoom Did this work before? N/A Chrome version: 49.0.2623.112 Channel: n/a OS Version: 5.1 (Windows XP) Flash Version: Shockwave Flash 23.0 r0 It is reproducable only under Windows (7, 8, 10)
,
Oct 3 2016
Able to reproduce this issue on Windows-10, Ubuntu 14,04 and Mac OS 10.12 using chrome latest stable M53-53.0.2785.143 and earlier version of chrome M35-35.0.1849.0. Observed that HTMLInputElement#scrollLeft returns wrong value while zooming the browser. This is a non-regression issue and marking it as untriaged.
,
Oct 3 2016
,
Oct 10 2016
,
Sep 8 2017
Unable to reproduce.
,
Oct 9 2017
It is still reproducible in Chrome 62 (Windows 7) |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by vmuhac...@gmail.com
, Oct 2 2016