Bug Tracker

Opened 11 years ago

Closed 11 years ago

#4016 closed bug (worksforme)

[IE 6 & 7] Errors when traversing child elements after inserting generated VML

Reported by: doctyper Owned by:
Priority: major Milestone: 1.3.2
Component: unfiled Version: 1.3.1
Keywords: Cc:
Blocked by: Blocking:

Description

IE 6 throws an error when traversing a parent's child nodes if the parent contains VML elements.

IE 7 throws an error if a child node's event is triggered.

Test Case Here: http://doctyper.com/stuff/jquery/vml-events.html

Change History (2)

comment:1 Changed 11 years ago by dmethvin

Problem happens on IE8RC1 as well. As of 1.3, a .trigger("click") bubbles. The page is doing this:

foo.click(function() {
   var span = foo.find('.goo');
   span.trigger("click");
});

In 1.3, the span.trigger("click") will bubble up to the foo element and re-execute the click handler, causing another trigger of the span, etc. If you want the foo.click handler to only execute on a foo click rather than a bubbled child event, add an e parameter and if (e.target!=this) return; to the top of the handler. Give this a try and I'll leave the ticket open for now.

comment:2 Changed 11 years ago by dmethvin

Resolution: worksforme
Status: newclosed

I think the proposed answer should address the problem so I'll close the ticket.

Note: See TracTickets for help on using tickets.