Closed
Bug 1007374
Opened 11 years ago
Closed 1 month ago
Showing negative value in dimensions for element with display:none
Categories
(DevTools :: Inspector: Layout, defect, P2)
DevTools
Inspector: Layout
Tracking
(firefox136 fixed)
RESOLVED
FIXED
136 Branch
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: bgrins, Assigned: xpresskaran98)
References
()
Details
Attachments
(2 files)
Go to: http://www.nerdist.com/podcasts-landing/.
Open devtools, and inspect this element: $$("#div-gpt-ad-300x250-tablet-grid")
Box model dimensions are showing 0x-27 or 0x-26 depending on the system. See gif at: https://twitter.com/jonathansampson/status/464137697800781824
Comment 1•9 years ago
|
||
Brian, the URL from comment 0 doesn't exist anymore, it redirects to the homepage.
I tried to search the node you indicated with no luck though.
I couldn't find any bug ( opened or closed ) with similar problem.
I doubt you remember what was the cause of this issue, but does it rings a bell ?
Flags: needinfo?(bgrinstead)
Priority: -- → P3
Reporter | ||
Comment 2•9 years ago
|
||
I am seeing one case of this still at: https://web.archive.org/web/20140509231150/http://www.nerdist.com/podcasts-landing if you select this element in the inspector: #div-gpt-ad-300x250-tablet-grid (which appears to be hidden and should be 0x0 but instead shows up as 0x-26.984)
Flags: needinfo?(bgrinstead)
Reporter | ||
Updated•9 years ago
|
Comment 3•9 years ago
|
||
Simpler STR :
1. Open attachment
2 [review]. Open Inspector
3. Select <div class="negative"> node
4. Open "Box Model" tab
Expected Result:
content box shows 0x0 (because div is "display:none;")
Actual Result:
content box shows -20x-20
Note that similar issue can be triggered with the "border" style applied on a none-displayed element.
Updated•7 years ago
|
Priority: P3 → P2
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
Comment 4•3 months ago
|
||
When the element isn't displayed, we could avoid showing any content size.
For what it's worth, Chrome is showing auto x auto
Component: Inspector → Inspector: Layout
Summary: [layout view] Showing negative value in dimensions for element → Showing negative value in dimensions for element with display:none
Assignee | ||
Comment 5•2 months ago
|
||
I have successfully reproduced this bug. Can this be assigned to me ?
Comment 6•1 month ago
|
||
(In reply to Karan Yadav from comment #5)
I have successfully reproduced this bug. Can this be assigned to me ?
Sure, I just assigned it to you
Assignee: nobody → xpresskaran98
Assignee | ||
Updated•1 month ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•1 month ago
|
||
Assignee | ||
Comment 8•1 month ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #4)
When the element isn't displayed, we could avoid showing any content size.
For what it's worth, Chrome is showingauto x auto
I have implemented the patch based on this suggestion. Please review it and let me know if there are any concerns or improvements needed.
Updated•1 month ago
|
Attachment #9445691 -
Attachment description: Bug 1007374 - Show Auto in box-model if width or height is less than 0. r=#devtools-reviewers → Bug 1007374 - Show Auto in box-model if width or height is less than 0 and add the test for the same. r=#devtools-reviewers
Updated•1 month ago
|
Attachment #9445691 -
Attachment description: Bug 1007374 - Show Auto in box-model if width or height is less than 0 and add the test for the same. r=#devtools-reviewers → Bug 1007374 - Show "auto" in box-model if width or height is less than 0. r=#devtools-reviewers
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec29bce06ae0
Show "auto" in box-model if width or height is less than 0. r=devtools-reviewers,nchevobbe
Comment 10•1 month ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
status-firefox136:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•