Bug Tracker

Ticket #1167 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

.removeClass("") removes every class

Reported by: arrix Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.1.3 Component: core
Version: 1.1.2 Keywords:
Cc: Needs: Review

Description

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

Attachments

Change History

follow-up: ↓ 2   Changed 1 year 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.

in reply to: ↑ 1   Changed 1 year 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]

Note: See TracTickets for help on using tickets.