Initial layout is wrong, for a position:absolute element, inside position:relative inline element, inside position:absolute element
Categories
(Core :: Layout: Positioned, defect, P3)
Tracking
()
People
(Reporter: joonas.mertanen, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, webcompat:platform-bug)
Attachments
(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:
Repro: https://repl.it/repls/SereneLinedScience
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.
Comment 1•5 years ago
|
||
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.
Comment 2•5 years ago
|
||
mozregression tried its best to give this range.
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=30ea2905130e85f9e1d8d56fa3097901eec6514b&tochange=67cd1ee26f2661fa5efe3d952485ab3c89af4271
Comment 3•5 years ago
|
||
Updated test in comment 1.
Updated•5 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Comment 4•5 months ago
|
||
I have some other testcases that look like the same sort of issue over in bug 1844515. (They involve a position:absolute element inside an inline position:relative element inside a <button>, with a tall line-height.)
The outermost layer is different from what's described here, but the inner two layers are the same and the regression range is the same, so I suspect it's the same issue (or closely related).
Updated•2 months ago
|
Description
•