Closed
Bug 1847777
Opened 2 years ago
Closed 2 years ago
scrollWidth doesn't factor in padding
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1768921
People
(Reporter: github, Unassigned)
Details
Attachments
(1 file)
156.92 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Steps to reproduce:
- Create a
div
with awidth
,overflow: hidden
, apadding
, and content that extends beyond the width (but small enough that it doesn't extend outside the padding). - Compare the scrollWidth and clientWidth of the element
- Create a
div
with awidth
,overflow: hidden
, apadding
, and content that extends well beyond the width - Compare the scrollWidth and clientWidth of the element in multiple browsers
A CodePen reproduction is available here: https://codepen.io/illandril/pen/dyQLBEM
A screenshot of the results I see in my testing is attached.
Actual results:
- scrollWidth is equal to the clientWidth
- scrollWidth in Firefox is smaller than Safari and Chrome; clientWidth is equal in Firefox, Safari, and Chrome
Expected results:
- scrollWidth is greater than the clientWidth
- scrollWidth and clientWidth is identical in all browsers
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Component: Untriaged → Layout
Product: Firefox → Core
Comment 2•2 years ago
|
||
Ah, yes - this is a duplicate of bug 1768921 - we should no longer "eat" the horizontal padding in calculating scrollable overflow.
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1768921
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•