Bug Tracker

Modify

Ticket #1167 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

.removeClass("") removes every class

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

Description

Passing an empty string("") to .removeClass() will cause every class to be removed. $('#someid').removeClass(""); => all classes of #someid removed

Change History

comment:1 follow-up: ↓ 2 Changed 6 years ago by 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.

comment:2 in reply to: ↑ 1 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to fixed

Replying to 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]

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.