Skip to main content

Bug Tracker

Side navigation

#1167 closed bug (fixed)

Opened May 11, 2007 03:31PM UTC

Closed May 11, 2007 10:29PM UTC

.removeClass("") removes every class

Reported by: arrix Owned by:
Priority: major Milestone: 1.1.3
Component: core Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:
Description

Passing an empty string("") to .removeClass() will cause every class to be removed.

$('#someid').removeClass(""); // => all classes of #someid removed

Attachments (0)
Change History (2)

Changed May 11, 2007 10:03PM UTC by brandon comment:1

The root of the problem seems to be in jQuery.className.has. You can also find a similar error using the is method with a blank string. It will always be true.

Changed May 11, 2007 10:29PM UTC by brandon comment:2

resolution: → fixed
status: newclosed

Replying to [comment:1 brandon]:

The root of the problem seems to be in jQuery.className.has. You can also find a similar error using the is method with a blank string. It will always be true.

Just ignore my ramblings ... it appears that is a different issue all together. This issue is now fixed in Rev [1887]