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
4534db19
Commit
4534db19
authored
Dec 14, 2011
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #11021. There should be no mangling of the "hover" namespace.
parent
5798eab1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
event.js
src/event.js
+1
-1
event.js
test/unit/event.js
+5
-1
No files found.
src/event.js
View file @
4534db19
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
var
rformElems
=
/^
(?:
textarea|input|select
)
$/i
,
var
rformElems
=
/^
(?:
textarea|input|select
)
$/i
,
rtypenamespace
=
/^
([^\.]
*
)?(?:\.(
.+
))?
$/
,
rtypenamespace
=
/^
([^\.]
*
)?(?:\.(
.+
))?
$/
,
rhoverHack
=
/
\b
hover
(\.\S
+
)?\b
/
,
rhoverHack
=
/
(?:
^|
\s)
hover
(\.\S
+
)?\b
/
,
rkeyEvent
=
/^key/
,
rkeyEvent
=
/^key/
,
rmouseEvent
=
/^
(?:
mouse|contextmenu
)
|click/
,
rmouseEvent
=
/^
(?:
mouse|contextmenu
)
|click/
,
rfocusMorph
=
/^
(?:
focusinfocus|focusoutblur
)
$/
,
rfocusMorph
=
/^
(?:
focusinfocus|focusoutblur
)
$/
,
...
...
test/unit/event.js
View file @
4534db19
...
@@ -787,7 +787,7 @@ test("unbind(eventObject)", function() {
...
@@ -787,7 +787,7 @@ test("unbind(eventObject)", function() {
});
});
test
(
"hover() and hover pseudo-event"
,
function
()
{
test
(
"hover() and hover pseudo-event"
,
function
()
{
expect
(
2
);
expect
(
3
);
var
times
=
0
,
var
times
=
0
,
handler1
=
function
(
event
)
{
++
times
;
},
handler1
=
function
(
event
)
{
++
times
;
},
...
@@ -810,6 +810,9 @@ test("hover() and hover pseudo-event", function() {
...
@@ -810,6 +810,9 @@ test("hover() and hover pseudo-event", function() {
.
on
(
"hovercraft"
,
function
()
{
.
on
(
"hovercraft"
,
function
()
{
ok
(
false
,
"hovercraft is full of ills"
);
ok
(
false
,
"hovercraft is full of ills"
);
})
})
.
on
(
"click.hover.me.not"
,
function
(
e
)
{
equal
(
e
.
handleObj
.
namespace
,
"hover.me.not"
,
"hover hack doesn't mangle namespaces"
);
})
.
bind
(
"hover"
,
function
(
e
)
{
.
bind
(
"hover"
,
function
(
e
)
{
if
(
e
.
type
===
"mouseenter"
)
{
if
(
e
.
type
===
"mouseenter"
)
{
balance
++
;
balance
++
;
...
@@ -819,6 +822,7 @@ test("hover() and hover pseudo-event", function() {
...
@@ -819,6 +822,7 @@ test("hover() and hover pseudo-event", function() {
ok
(
false
,
"hover pseudo: unknown event type "
+
e
.
type
);
ok
(
false
,
"hover pseudo: unknown event type "
+
e
.
type
);
}
}
})
})
.
trigger
(
"click"
)
.
trigger
(
"mouseenter"
)
.
trigger
(
"mouseenter"
)
.
trigger
(
"mouseleave"
)
.
trigger
(
"mouseleave"
)
.
unbind
(
"hover"
)
.
unbind
(
"hover"
)
...
...
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