Open Bug 1597100 Opened 11 months ago Updated 4 months ago

Initial layouting of an absolute element inside inline relative element inside absolute element is wrong


(Core :: Layout: Positioned, defect, P3)

70 Branch




(Reporter: joonas.mertanen, Unassigned)





(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:


Minimal repro was a bit hard to achieve, but having this kind of DOM tree:

  • (lowest in hierarchy) <h3 position="absolute" />
  • <span position="relative" />
  • <div position="absolute" />
    seems to cause a weird initial layouting bug, where the layouting is wrong on the initial render, but corrects itself if you edit some property (eg. toggling "right: 5px" on the h3 off and on fixes the layouting)

Actual results:

The absolutely positioned Date h3 is positioned above the other Title h3

Expected results:

Date h3 should be positioned on same level as Title h3, and actually does get positioned there if you somehow mark the layout as dirty.

Component: Untriaged → Layout
Product: Firefox → Core
Attached file bug1597100-absolute-pos.html (obsolete) —

A further reduced test case from comment 0. It looks like the position:absolute's y position is changed only if it is under a position:relative inline.

Component: Layout → Layout: Positioned
Ever confirmed: true
Priority: -- → P3

Updated test in comment 1.

Attachment #9110126 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.