Closed
Bug 748526
Opened 14 years ago
Closed 14 years ago
If body is {overflow:hidden}, absolute coordinates of an inner absolute element are wrong
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(blocking-fennec1.0 +)
VERIFIED
DUPLICATE
of bug 753742
| Tracking | Status | |
|---|---|---|
| blocking-fennec1.0 | --- | + |
People
(Reporter: paul, Assigned: mbrubeck)
References
()
Details
(Whiteboard: [testday-20120518])
With this code:
<!DOCTYPE html>
<meta charset="utf-8">
<title>xxx</title>
<div></div>
<style>
p{position:absolute}
div {
position: absolute; top: 50%; left: 50%;
outline: 15px solid red;
}
body {overflow: hidden;}
</style>
Expected result: red square in the middle of the page.
Actual result: red square is not visible (overflow on the bottom right corner).
Without `body {overflow: hidden;}`, there's no problem.
Using top:25%; left:25%; centers the square.
Comment 1•14 years ago
|
||
I'm a little worried about why this is breaking our viewport
Assignee: nobody → mbrubeck
blocking-fennec1.0: --- → ?
Comment 2•14 years ago
|
||
Same deal with bug 746120 ?
Comment 3•14 years ago
|
||
Copied the sample to my people account for easier access. What I see when I load the page on the GN is at http://people.mozilla.org/~kgupta/bug/748526.png - it seems to me like the page has a CSS viewport width of 980 as expected, the div is positioned in the middle of that (at x=490), and the overflow is hidden, preventing scrolling beyond x=720 (width of the GN). On devices with width less than 490 the red square will not be visible at all. I'm not sure if any part of this is incorrect.
Comment 4•14 years ago
|
||
Paul, do you agree with #3?
Comment 5•14 years ago
|
||
Since this issue is affecting maps.google.com as well, I will investigate possible changes to fix it. See https://bugzilla.mozilla.org/show_bug.cgi?id=735652#c13
Comment 6•14 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #3)
> Copied the sample to my people account for easier access. What I see when I
> load the page on the GN is at
> http://people.mozilla.org/~kgupta/bug/748526.png - it seems to me like the
> page has a CSS viewport width of 980 as expected, the div is positioned in
> the middle of that (at x=490), and the overflow is hidden, preventing
> scrolling beyond x=720 (width of the GN). On devices with width less than
> 490 the red square will not be visible at all. I'm not sure if any part of
> this is incorrect.
Turns out I was totally wrong here. I will investigate further, and probably end up duping this bug to 735652 since I'm fairly certain they are the same issue.
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Updated•14 years ago
|
blocking-fennec1.0: ? → +
Comment 9•14 years ago
|
||
Verify that this bug is fixed on nightly (v15 - 18 May).
The bug still affects beta (v14.0b2)
Tested on sgs2 cyanogenmod 9 (ics)
Tested url: http://people.mozilla.org/~kgupta/bug/748526.html
Whiteboard: [testday-20120518]
Updated•14 years ago
|
Status: RESOLVED → VERIFIED
Updated•9 years ago
|
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•