MathML menclose is missing offset* properties

RESOLVED INVALID

Status

()

RESOLVED INVALID
7 years ago
7 years ago

People

(Reporter: ghazel, Unassigned)

Tracking

7 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Created attachment 570590 [details]
foo.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

Tried to get the width and height of a menclose element. (demo attached)


Actual results:

Found unexpected undefined elements.


Expected results:

Should have found offset elements like other DOM elements.
The offset* properties are on the HTMLElement interface.

MathML elements don't implement that interface, of course.

Similarly, offset* is not present on SVG elements, or any other non-HTML element in the DOM.

Which is fine, since the offset* properties return incorrect dimensions anyway.  If you want to get the width and height of something, use getBoundingClientRect, which _is_ on all elements.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

7 years ago
getBoundingClientRect seems to be affected by scroll position. Are the offset orop
Summary: MathML menclose has no offsetWidth or offsetParent → MathML menclose is missing attributes
(Reporter)

Comment 3

7 years ago
Nevermind, I figured out the scroll position thing.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(Reporter)

Updated

7 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → INVALID
> getBoundingClientRect seems to be affected by scroll position.

The width and height (what you said you're looking for) are certainly not.

If you can explain what you're trying to do and why getBoundingClientRect doesn't work for you, I'll forward that along to the CSSOM View working group defining the specs for this.
Summary: MathML menclose is missing attributes → MathML menclose is missing offset* properties
(Reporter)

Comment 5

7 years ago
The goal is very simple: find the exact placement and size of the menclose, and overlay a DOM element exactly on top of it.

Between scroll adjusted top and left from getBoundingClientRect and the width and height you mentioned, I was able to do it.
(Reporter)

Comment 6

7 years ago
But man it would have been a lot easier if I could have replaced the menclose with an input field in the DOM.
You need to log in before you can comment on or make changes to this bug.