Closed
Bug 207426
Opened 21 years ago
Closed 19 years ago
underlined text returns incorrect value for offsetHeight
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
INVALID
People
(Reporter: derrida17, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
864 bytes,
text/html
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Build Identifier: Mozilla/5.0 When the text-decoration in an anchor is set to underline, the javascript engine determines the offsetHeight for the anchor *excluding* the underline, when it should *include* the underline. This creates problems when trying to dynamically position elements relative to anchors. Reproducible: Always Steps to Reproduce: 1. Create an anchor tag with style="text-decoration: underline" 2. Identify the tag using the XHTML id element. 3. Attempt to load the tag's offsetHeight using document.getElementById (...).offsetHeight Actual Results: The value of offsetHeight excludes the underline part of the anchor tag. Expected Results: Mozilla should include the actual underline when computing the offsetHeight, so as to produce more accurate values.
Comment 1•21 years ago
|
||
Can you provide with a testcase?
Comment 2•21 years ago
|
||
---> DOM Style component
Assignee: rogerl → dom_bugs
Component: JavaScript Engine → DOM Style
QA Contact: pschwartau → ian
Comment 3•21 years ago
|
||
If you put a border on the anchor, does the underline lie inside or outside the border? Depending on the markup, the underline may well effectively lie outside the anchor...
Comment 4•19 years ago
|
||
offsetHeight is the same for links with underline and without. Adding a border to a link shows the underline within the border, but then the offsetHeight will be bigger IE and Opera does the same as Mozilla here
Updated•19 years ago
|
Attachment #178033 -
Attachment mime type: text/plain → text/html
Comment 5•19 years ago
|
||
OK, if we're compatible with IE then we're doing the right thing, since the definition of offsetHeight is "do what IE does"...
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•