From 50c40add5ab530cefbdd09dbdcb641f22b9dc26c Mon Sep 17 00:00:00 2001 From: David Serduke Date: Thu, 20 Dec 2007 20:40:20 +0000 Subject: [PATCH] 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. --- src/core.js | 2 ++ test/unit/fx.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index c2f94d2b..10db3eda 100644 --- a/src/core.js +++ b/src/core.js @@ -323,6 +323,8 @@ jQuery.fn = jQuery.prototype = { // Copy the events from the original to the clone if ( events === true ) this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; var events = jQuery.data( this, "events" ); for ( var type in events ) diff --git a/test/unit/fx.js b/test/unit/fx.js index 5f6ad399..1204e261 100644 --- a/test/unit/fx.js +++ b/test/unit/fx.js @@ -1,12 +1,13 @@ module("fx"); test("animate(Hash, Object, Function)", function() { - expect(3); + expect(1); stop(); var hash = {opacity: 'show'}; var hashCopy = $.extend({}, hash); $('#foo').animate(hash, 0, function() { ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' ); + start(); }); });