Skip to content

Commit 50c40ad

Browse files
committed
Fixed a couple problems found in the test suite. First, IE doesn't like it when text nodes were trying to duplicate their events in clone, so don't do text nodes (that shouldn't have events anyway). Also the fx module was freezing from a recent update that wasn't quite finished.
1 parent bdd6aca commit 50c40ad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/core.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ jQuery.fn = jQuery.prototype = {
323323
// Copy the events from the original to the clone
324324
if ( events === true )
325325
this.find("*").andSelf().each(function(i){
326+
if (this.nodeType == 3)
327+
return;
326328
var events = jQuery.data( this, "events" );
327329

328330
for ( var type in events )

test/unit/fx.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
module("fx");
22

33
test("animate(Hash, Object, Function)", function() {
4-
expect(3);
4+
expect(1);
55
stop();
66
var hash = {opacity: 'show'};
77
var hashCopy = $.extend({}, hash);
88
$('#foo').animate(hash, 0, function() {
99
ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
10+
start();
1011
});
1112
});
1213

0 commit comments

Comments
 (0)