Bug Tracker

Modify

Ticket #6914 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

addClass duplication bug in 1.4.2

Reported by: twophayse Owned by:
Priority: Milestone: 1.4.2
Component: manipulation Version: 1.4.2
Keywords: addClass Cc:
Blocking: Blocked by:

Description

In 1.4.2, foo.addClass("disabled");

adds disabled even if it already exists. As a result, the DOM element becomes

<span class="disabled disabled">

and foo.removeClass("disabled")

needs to be run more multiple times.

This is not an issue in 1.3.2.

Attachments

test-6914.html Download (561 bytes) - added by dmethvin 3 years ago.

Change History

comment:1 Changed 3 years ago by dmethvin

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

I thought, "This can't be broken, since addClass is used everywhere. But then again, maybe we missed something obvious. That twophayse guy must have done his homework, so I'll look into it."

So I spent 5 minutes of my time creating a test case. And it works fine.

Changed 3 years ago by dmethvin

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.