mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix bad calls to .undelegate().
Remove two tests that assume "live" data structure.
This commit is contained in:
parent
28c2330665
commit
8b4bd89add
@ -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(66);
|
||||
expect(65);
|
||||
|
||||
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(65);
|
||||
expect(64);
|
||||
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user