git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dd5c263
)
Make sure that mousing over XUL elements results in no trigger of a mouseleave. Fixes...
author
jeresig
<jeresig@gmail.com>
Sat, 13 Feb 2010 10:45:48 +0000
(
05:45
-0500)
committer
jeresig
<jeresig@gmail.com>
Sat, 13 Feb 2010 10:45:48 +0000
(
05:45
-0500)
src/event.js
patch
|
blob
|
history
diff --git
a/src/event.js
b/src/event.js
index
d59533f
..
6e65438
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-604,27
+604,24
@@
var withinElement = function( event ) {
// Check if mouse(over|out) are still within the same parent element
var parent = event.relatedTarget;
// Check if mouse(over|out) are still within the same parent element
var parent = event.relatedTarget;
- // Traverse up the tree
- while ( parent && parent !== this ) {
- // Firefox sometimes assigns relatedTarget a XUL element
- // which we cannot access the parentNode property of
- try {
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
parent = parent.parentNode;
parent = parent.parentNode;
-
- // assuming we've left the element since we most likely mousedover a xul element
- } catch(e) {
- break;
}
}
- }
- if ( parent !== this ) {
- // set the correct event type
- event.type = event.data;
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
- // handle event if we actually just moused on to a non sub-element
- jQuery.event.handle.apply( this, arguments );
- }
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) { }
},
// In case of event delegation, we only need to rename the event.type,
},
// In case of event delegation, we only need to rename the event.type,