Skip to content

Commit

Permalink
Effects Core: make removeClass work correctly with changes jQuery 1.9…
Browse files Browse the repository at this point in the history
….0. Fixed #9015 - Inclusion of jQuery UI breaks removeClass
  • Loading branch information
petersendidit committed Jan 29, 2013
1 parent 3aa8ad0 commit 2ca4d17
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions tests/unit/effects/effects_core.js
Expand Up @@ -38,6 +38,17 @@ asyncTest( "Parse of null for options", function() {
});
});

test( "removeClass", function() {
expect( 3 );

var element = $( "<div>" );
equal( "", element[ 0 ].className );
element.addClass( "destroyed" );
equal( "destroyed", element[ 0 ].className );
element.removeClass();
equal( "", element[ 0 ].className );
});


/* TODO: Disabled - Can't figure out why this is failing in IE 6/7
test( "createWrapper and removeWrapper retain focused elements (#7595)", function() {
Expand Down
4 changes: 2 additions & 2 deletions ui/jquery.ui.effect.js
Expand Up @@ -849,10 +849,10 @@ $.fn.extend({

_removeClass: $.fn.removeClass,
removeClass: function( classNames, speed, easing, callback ) {
return speed ?
return arguments.length > 1 ?
$.effects.animateClass.call( this,
{ remove: classNames }, speed, easing, callback ) :
this._removeClass( classNames );
this._removeClass.apply( this, arguments );
},

_toggleClass: $.fn.toggleClass,
Expand Down

2 comments on commit 2ca4d17

@meelash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be merged into the 1.9 stable branch so that people that are on that can get this fix in the next version update? Or is that branch already frozen from further bug updates?

@scottgonzalez
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There won't be any more 1.9.x releases.

Please sign in to comment.