Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
6a82f2ae
Commit
6a82f2ae
authored
Feb 13, 2010
by
jeresig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that mousing over XUL elements results in no trigger of a mouseleave. Fixes #6013.
parent
dd5c2630
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
event.js
src/event.js
+13
-16
No files found.
src/event.js
View file @
6a82f2ae
...
@@ -604,17 +604,12 @@ var withinElement = function( event ) {
...
@@ -604,17 +604,12 @@ var withinElement = function( event ) {
// Check if mouse(over|out) are still within the same parent element
// Check if mouse(over|out) are still within the same parent element
var parent = event.relatedTarget;
var parent = event.relatedTarget;
// Traverse up the tree
while ( parent && parent !== this ) {
// Firefox sometimes assigns relatedTarget a XUL element
// Firefox sometimes assigns relatedTarget a XUL element
// which we cannot access the parentNode property of
// which we cannot access the parentNode property of
try {
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 ) {
if ( parent !== this ) {
...
@@ -625,6 +620,8 @@ var withinElement = function( event ) {
...
@@ -625,6 +620,8 @@ var withinElement = function( event ) {
jQuery.event.handle.apply( this, arguments );
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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment