Open
Bug 356665
Opened 18 years ago
Updated 2 years ago
If table element has margin styled, then the offsetLeft, offsetTop, offsetWidth and offsetHeight of this table element will be wrong.
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
NEW
People
(Reporter: topperlu, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
If table element has margin styled, then we got
offsetWidth = correct value + margin-left + margin-right,
offsetHeight = correct value + margin-top + margin-bottom,
offsetLeft = correct value + margin-left,
offsetTop = correct value + margin-top.
The BoxObject of this table has same problems.
Reproducible: Always
Steps to Reproduce:
1. Create a TABLE element, with margin styled.
2. Check offsetLeft, offsetWidth, ...
3.
Actual Results:
offsetWidth = correct value + margin-left + margin-right,
offsetHeight = correct value + margin-top + margin-bottom,
offsetLeft = correct value + margin-left,
offsetTop = correct value + margin-top.
Updated•18 years ago
|
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
Alignment was effected through the following css style:
table.alignCenter
{
margin-left:auto;
margin-right:auto;
}
This method was chosen to pass W3C validation. However the bug is there as well when you use the align=center attribute for the table
Comment 3•18 years ago
|
||
If bug 258255 was in the correct component then this would be a duplicate.
Comment 4•17 years ago
|
||
This bug causes errors in Firebug inspect for tables with margin.
http://code.google.com/p/fbug/issues/detail?id=289
Comment 5•17 years ago
|
||
I want to mark this 'firebug wanted' but the UI won't let me. So I am cc beltzner.
Comment 6•17 years ago
|
||
Just tested this in FF3.0b4pre and the problem still exists but the offset is different.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 7•17 years ago
|
||
Could we get a testcase that reports a binary pass/fail result [instead of just a gob of numbers] for the dimensions being tested? That would help for verifying the bug, and eventual conversion to a mochitest for the test suite.
Whiteboard: [firebug-p1]
Version: 1.8 Branch → Trunk
Updated•17 years ago
|
Whiteboard: [firebug-p1] → [firebug-p3]
Comment 8•16 years ago
|
||
Also probably causes:
Issue 68: Inspect outline located too much to the left or right of element
http://code.google.com/p/fbug/issues/detail?id=68
Issue 123: "position: absolute" on "body" element confuses Firebug
http://code.google.com/p/fbug/issues/detail?id=123
Moving up on firebug list.
Whiteboard: [firebug-p3] → [firebug-p2]
Comment 9•16 years ago
|
||
I'll try marking the firebug-p2 bugs as wanted for 1.9.2
Flags: wanted1.9.2?
Comment 10•16 years ago
|
||
Also happens on OS X. A good testcase can be found with attachment 337022 [details].
John, please use getBoundingClientRect/getClientRects in Firebug instead of the offset* properties.
Comment 12•16 years ago
|
||
Ok thanks, I thought that these functions might be good alternatives but I didn't understand the details enough to know for sure. This will encourage me.
Comment 14•16 years ago
|
||
Mike Radcliffe took up the challenge and used getBoundingClientRect to slay at least 6 Firebug bugs related to offsets. (In Firebug 1.4a24).
Flags: wanted1.9.2?
Whiteboard: [firebug-p2]
Comment 15•15 years ago
|
||
I guess bug 562005 is related to this bug, right?
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•