fix for #3286
This commit is contained in:
parent
4460d5ad59
commit
3a9c827bf8
|
@ -388,14 +388,14 @@ jQuery.event = {
|
||||||
setup: bindReady,
|
setup: bindReady,
|
||||||
teardown: function() {}
|
teardown: function() {}
|
||||||
},
|
},
|
||||||
|
|
||||||
live: {
|
live: {
|
||||||
add: function( proxy, data, namespaces ) {
|
add: function( proxy, data, namespaces ) {
|
||||||
jQuery.extend( proxy, data || {} );
|
jQuery.extend( proxy, data || {} );
|
||||||
proxy.guid += data.selector + data.live;
|
proxy.guid += data.selector + data.live;
|
||||||
jQuery.event.add( this, data.live, liveHandler );
|
jQuery.event.add( this, data.live, liveHandler );
|
||||||
},
|
},
|
||||||
|
|
||||||
teardown: function( namespaces ) {
|
teardown: function( namespaces ) {
|
||||||
jQuery.event.remove( this, namespaces[0], liveHandler );
|
jQuery.event.remove( this, namespaces[0], liveHandler );
|
||||||
}
|
}
|
||||||
|
@ -479,8 +479,11 @@ var withinElement = function( event ) {
|
||||||
var parent = event.relatedTarget;
|
var parent = event.relatedTarget;
|
||||||
// Traverse up the tree
|
// Traverse up the tree
|
||||||
while ( parent && parent != this ) {
|
while ( parent && parent != this ) {
|
||||||
|
// Firefox sometimes assigns relatedTarget a XUL element
|
||||||
|
// which we cannot access the parentNode property of
|
||||||
try { parent = parent.parentNode; }
|
try { parent = parent.parentNode; }
|
||||||
catch(e) { parent = this; }
|
// assuming we've left the element since we most likely mousedover a xul element
|
||||||
|
catch(e) { break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( parent != this ) {
|
if ( parent != this ) {
|
||||||
|
|
Loading…
Reference in a new issue