scrollWidth returned with insufficient precision
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
People
(Reporter: travtrilogi, Unassigned)
References
Details
Reporter | ||
Comment 1•9 years ago
|
||
Updated•9 years ago
|
Comment 2•9 years ago
|
||
Reporter | ||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Reporter | ||
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment 9•3 years ago
|
||
I tend to think we should resolve this as wontfix given the www-style discussion linked in comment 6, where Chrome folks said it wouldn't be web-compatible to change the type for these widths/heights. That's likely still true.
Also, these days you can workaround it by using Range.getBoundingClientRect() instead. Just create a Range object, initialize it include all node children of the element you're interested in, then call getBoundingClientRect() on the range to get the union of all the border boxes of the children. That should cover most of these use cases.
In any case, we won't fix this unless there's consensus about changing the spec first (which, frankly, I don't see happening).
If getBoundingClientRect() is insufficient for your use case then please file a spec issue at https://github.com/w3c/csswg-drafts/issues/ about it.
Description
•