Open
Bug 492551
Opened 16 years ago
Updated 3 years ago
offsetLeft and offsetTop of a position:absolute element is off by the offsetParent's border.
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: aharon, Unassigned)
Details
Attachments
(1 file)
4.51 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090512 Minefield/3.6a1pre GTBDFff GTB5
The offsetLeft property of a position:absolute element whose offsetParent has both a left border and a vertical scrollbar is wrong. It is too low by the width of the offsetParent's left border.
Similarly, the offsetTop property of a position:absolute element whose offsetParent has both a top border and a horizontal scrollbar is wrong. It is too low by the width of the offsetParent's top border.
This occurs in FF2 and FF3 and the current trunk build version (see build identifier).
This is similar to, but not identical to Bug 476510, which is fixed in the current trunk build version.
Reproducible: Always
Steps to Reproduce:
Open attached test case.
Actual Results:
b3.offsetLeft and d3.offsetTop are displayed as -20.
Expected Results:
b3.offsetLeft and d3.offsetTop should be 0.
Reporter | ||
Comment 1•16 years ago
|
||
Reporter | ||
Comment 2•16 years ago
|
||
The bug does not reproduce in IE7, Safari 4 (beta), or Chrome 1.
Updated•16 years ago
|
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
Reporter | ||
Comment 3•16 years ago
|
||
Please note that the bug does not reproduce when the offsetParent is the body, even when it has a border and scrollbars.
Reporter | ||
Comment 4•16 years ago
|
||
More info: you do not need an actual vertical scrollbar in the offsetParent for the bug to reproduce. The offsetParent only needs to have overflow other than the default "visible".
Reporter | ||
Updated•14 years ago
|
Summary: offsetLeft and offsetTop of a position:absolute element is off by the offsetParent's margin. → offsetLeft and offsetTop of a position:absolute element is off by the offsetParent's border.
Comment 5•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•