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
0ec71ac7
Commit
0ec71ac7
authored
Sep 08, 2011
by
Dave Methvin
Committed by
timmywil
Sep 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the special event handler for mouseover/out events.
And use the /dist version of jquery.js, willya?
parent
8ba5010a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
event.js
src/event.js
+3
-1
hovertest.html
test/hovertest.html
+1
-1
No files found.
src/event.js
View file @
0ec71ac7
...
@@ -717,11 +717,13 @@ jQuery.each({
...
@@ -717,11 +717,13 @@ jQuery.each({
selector
=
handleObj
.
selector
,
selector
=
handleObj
.
selector
,
oldType
,
ret
;
oldType
,
ret
;
// NB: No relatedTarget if the mouse left/entered the browser window
if
(
selector
&&
related
)
{
if
(
selector
&&
related
)
{
// Delegated event; find the real relatedTarget
// Delegated event; find the real relatedTarget
related
=
jQuery
(
related
).
closest
(
selector
)[
0
];
related
=
jQuery
(
related
).
closest
(
selector
)[
0
];
}
}
if
(
!
related
||
related
!==
target
&&
!
jQuery
.
contains
(
target
,
related
)
)
{
// For mouseover/out, contains isn't needed; handle() already determined it's the right target
if
(
!
related
||
handleObj
.
origType
===
event
.
type
||
(
related
!==
target
&&
!
jQuery
.
contains
(
target
,
related
))
)
{
oldType
=
event
.
type
;
oldType
=
event
.
type
;
event
.
type
=
handleObj
.
origType
;
event
.
type
=
handleObj
.
origType
;
ret
=
handleObj
.
handler
.
apply
(
this
,
arguments
);
ret
=
handleObj
.
handler
.
apply
(
this
,
arguments
);
...
...
test/hovertest.html
View file @
0ec71ac7
<html>
<html>
<head>
<head>
<title>
Hover tests
</title>
<title>
Hover tests
</title>
<script
src=
"
http://code.jquery.com/jquery-1.6.2
.js"
type=
'text/javascript'
></script>
<script
src=
"
../dist/jquery
.js"
type=
'text/javascript'
></script>
<style>
<style>
/* Remove body dimensions so we can test enter/leave to surrounding browser chrome */
/* Remove body dimensions so we can test enter/leave to surrounding browser chrome */
body
,
html
{
body
,
html
{
...
...
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