Fix #13180: don't delegate into SVG <use>

This commit is contained in:
Richard Gibson
2013-01-13 14:32:38 -05:00
committed by Dave Methvin
parent 7812aab1c9
commit f860e0bd2f

View File

@@ -405,8 +405,9 @@ jQuery.event = {
cur = event.target; cur = event.target;
// Find delegate handlers // Find delegate handlers
// Black-hole SVG <use> instance trees (#13180)
// Avoid non-left-click bubbling in Firefox (#3861) // Avoid non-left-click bubbling in Firefox (#3861)
if ( delegateCount && (!event.button || event.type !== "click") ) { if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
for ( ; cur != this; cur = cur.parentNode || this ) { for ( ; cur != this; cur = cur.parentNode || this ) {