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
8b4bd89a
Commit
8b4bd89a
authored
Jul 28, 2011
by
Dave Methvin
Committed by
timmywil
Sep 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bad calls to .undelegate().
Remove two tests that assume "live" data structure.
parent
28c23306
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
event.js
test/unit/event.js
+4
-11
No files found.
test/unit/event.js
View file @
8b4bd89a
...
...
@@ -371,7 +371,7 @@ test("bind/delegate bubbling, isDefaultPrevented", function() {
});
fakeClick
(
$anchor2
);
$anchor2
.
unbind
(
"click"
);
$main
.
undelegate
(
"click"
);
$main
.
undelegate
(
"
#foo"
,
"
click"
);
$anchor2
.
click
(
function
(
e
)
{
// Let the default action occur
});
...
...
@@ -380,7 +380,7 @@ test("bind/delegate bubbling, isDefaultPrevented", function() {
});
fakeClick
(
$anchor2
);
$anchor2
.
unbind
(
"click"
);
$main
.
undelegate
(
"click"
);
$main
.
undelegate
(
"
#foo"
,
"
click"
);
});
test
(
"bind(), iframes"
,
function
()
{
...
...
@@ -1188,7 +1188,7 @@ test("toggle(Function, Function, ...)", function() {
});
test
(
".live()/.die()"
,
function
()
{
expect
(
6
6
);
expect
(
6
5
);
var
submit
=
0
,
div
=
0
,
livea
=
0
,
liveb
=
0
;
...
...
@@ -1284,9 +1284,6 @@ test(".live()/.die()", function() {
jQuery
(
"body"
).
trigger
(
"click"
);
equals
(
clicked
,
2
,
"live with a context"
);
// Make sure the event is actually stored on the context
ok
(
jQuery
.
_data
(
container
,
"events"
).
live
,
"live with a context"
);
// Test unbinding with a different context
jQuery
(
"#foo"
,
container
).
die
(
"click"
);
jQuery
(
"#foo"
).
trigger
(
"click"
);
...
...
@@ -1703,7 +1700,6 @@ test("live with special events", function() {
jQuery
(
"#liveSpan1"
).
trigger
(
"foo"
);
// Run: Handler 1, Default
// TODO: Namespace doesn't trigger default (?)
jQuery
(
"#liveSpan1"
).
trigger
(
"foo.a"
);
// Run: remove
...
...
@@ -1719,7 +1715,7 @@ test("live with special events", function() {
});
test
(
".delegate()/.undelegate()"
,
function
()
{
expect
(
6
5
);
expect
(
6
4
);
var
submit
=
0
,
div
=
0
,
livea
=
0
,
liveb
=
0
;
...
...
@@ -1815,9 +1811,6 @@ test(".delegate()/.undelegate()", function() {
jQuery
(
"body"
).
trigger
(
"click"
);
equals
(
clicked
,
2
,
"delegate with a context"
);
// Make sure the event is actually stored on the context
ok
(
jQuery
.
_data
(
container
,
"events"
).
live
,
"delegate with a context"
);
// Test unbinding with a different context
jQuery
(
"#qunit-fixture"
).
undelegate
(
"#foo"
,
"click"
);
jQuery
(
"#foo"
).
trigger
(
"click"
);
...
...
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