New issue
Advanced search Search tips

Issue 827058 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

DevRel-SAP: Wrong width calculation of right align InputField

Reported by thorsten...@sap.com, Mar 29 2018

Issue description

What is the version of Chrome (chrome://settings/help)?
Version 65.0.3325.181 (Official Build) (64-bit)

What is the OS Version?
Windows 10 - 1607 (OS Build 14393)

What are the steps to reproduce the problem?
* Start the Codepen link: https://codepen.io/dominikschreiber/pen/NYyaXZ

The issue is about a InputField with CSS "text-align: right". The value scrollWidth and clientWidth should be the same as the text is completely visible but differs by 1px.

<input value="12345" style="text-align: right">
Compare scrollWidth and clientWidth  


 

What is the expected behavior?
scrollWidth=clientWidth  

What is the experienced behavior?
scrollWidth<>clientWidth

Has the experienced behavior changed?
Not sure - we just get now messages about it


Is the experienced behavior different in other browsers?
Tested correctly with Firefox, IE11 and Edge


 

Comment 1 by thorsten...@sap.com, Mar 29 2018

Sorry are you able to adjust the title. I overseen it:

Title would be SAP: Wrong width calculation of right align InputField
Summary: DevRel-SAP: Wrong width calculation of right align InputField (was: DevRel-SAP:)
Components: -Enterprise Blink>CSS
Labels: OS-Windows
Removing Enterprise component and adding CSS.
Cc: susan.boorgula@chromium.org
Labels: Triaged-ET M-67 Target-67 FoundIn-67 Needs-Triage-M65 OS-Linux OS-Mac Pri-2 Type-Bug
Status: Untriaged (was: Unconfirmed)
thorsten.dencker@ Thanks for the issue.

Able to reproduce the issue on Mac OS 10.13.3, Windows 10 and Ubuntu 14.04 and on the latest Canary 67.0.3386.0 and Stable 65.0.3325.181 by following the given steps above.

On opening the given Codepen link, can observe a difference a 1px between scrollWidth and clientWidth.
Attached is the screen shot for reference.

This is a Non-Regression issue as this behavior is observed from M60 Chrome builds. 
Hence marking this as Untriaged for further updates from Dev.

Thanks..
827058.PNG
83.0 KB View Download
An additional observation regarding this behavior: if you select the value of the <input> via mouse (starting from the left), as soon as you select the last character ("5" in the repro), the text scrolls 1px to the left. It is easier to spot this when zooming the page to the max. My interpretation would be that the scrollWidth/contentWidth computation is correct, but that the value is initially scrolled by 1px without any reasonable explanation.

Comment 6 by e...@chromium.org, Apr 4 2018

Components: -Blink>CSS Blink>Input
Components: -Blink>Input Blink>Layout

Comment 8 by e...@chromium.org, Apr 6 2018

Cc: bokan@chromium.org
Components: -Blink>Layout Blink>Scroll

Comment 9 by bokan@chromium.org, Apr 6 2018

Labels: -Pri-2 Pri-3
Looks like a pixel snapping issue - doesn't repro on my high-DPI monitor until I reloaded the page zoomed out to 50%.

Comment 10 by bokan@chromium.org, Apr 12 2018

Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)

Sign in to add a comment