Closed Bug 183878 Opened 22 years ago Closed 21 years ago

implement GetBindingParent on genericDOMDataNode

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jmt, Assigned: hyatt)

References

Details

Attachments

(1 file)

Since we added text support to SVG, we're having a problem that we frequently get event's whose originalTarget is a text node, not an element. Calling GetBindingParent on these fails, so we're reduced to: if (event.originalTarget.nodeType != Node.ELEMENT_NODE) target = event.originalTarget.parentNode; else target = event.originalTarget Which is ugly. The method exists in nsIContent, and is trivial to implement (by calling it recursively on the node's parent). So can this get applied please? (Patch to follow in a second). There are a plethora of other nsIContent APIs unimplemented on genericDOMDataNode, but this is the only one that matters to us.
I've just had a discussion with James, and it's quite possible that this is an SVG bug. I'm not sure data nodes should ever be event targets. Probably the enclosing <svg:text> or <svg:tspan> element should be the actual originalTarget.
Depends on: 97634
Fixed by patch in bug 97634
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: