New issue
Advanced search Search tips

Issue 810260 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

The width of getBoundingClientRect() is incorrect if the element has 'word-spacing' and nodes only with spaces

Reported by wpp...@gmail.com, Feb 8 2018

Issue description

Chrome Version       : 64.0.3282.140
OS Version: 10.0
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari:
    Firefox: Ok
    IE/Edge: Ok

What steps will reproduce the problem?
1. open chrome
2. drag word-spacing.html into chrome
3. open developer tools and select the div

What is the expected result?
The width of div is 165px.

What happens instead of that?
The width of div is 195px.

The actual width of 195px, but developer tools show 165px. Firefox and Edge both are 165px.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36



 
firefox.JPG
46.2 KB View Download
edge.JPG
86.3 KB View Download
chrome.JPG
31.0 KB View Download
word-spacing.html
506 bytes View Download

Comment 1 by kojii@chromium.org, Feb 8 2018

Components: Blink>Layout
Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac
Status: Available (was: Unconfirmed)
Summary: The width of getBoundingClientRect() is incorrect if the element has 'word-spacing' and nodes only with spaces (was: A strange phenomenon about word-spacing and  )
The problem exists in Safari too.

Sign in to add a comment