Closed Bug 1949953 Opened 23 days ago Closed 18 days ago

Show offsetParent of fixed position element if it is not the viewport

Categories

(DevTools :: Inspector: Layout, defect, P3)

defect

Tracking

(firefox137 fixed)

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: jamesnw, Assigned: jamesnw)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36

Steps to reproduce:

I used the DevTools > Layout > Box Model > Box Model Properties to inspect a fixed position element that was inside of a <DIV> with a style of transform: translate(0,0). The transform creates a containing block / offsetParent for the fixed position element that is not the viewport.

Reproduction: https://codepen.io/jamessw/pen/OPJXyYW

<div style="transform: translate(0);">
<div style="position: fixed;">Fixed, but offsetParent is the parent div</div>
</div>

Actual results:

No Offset Parent of the selected element is shown.

Expected results:

The offset parent of the element should have been shown, in the same way as for absolute and relative positioned elements. This will help users understand why a fixed position element is not fixed to the viewport.

The Bugbug bot thinks this bug should belong to the 'DevTools::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → DevTools

Shows in DevTools > Layout > Box Model > Box Model Properties.

Assignee: nobody → jamesnw
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Severity: -- → S3
Type: enhancement → defect
Priority: -- → P3
Component: General → Inspector: Layout
Summary: DevTools Layout: Show offsetParent of fixed position element if it is not the viewport → Show offsetParent of fixed position element if it is not the viewport
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/32e80692f39f Show offset parent of fixed position elements if not root. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: