Opened 7 years ago

Closed 7 years ago

#8978 closed bug (duplicate)

Effects: removeClass without parameters does not remove all classes

Reported by: MichaelM Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.effects.* (individual effect) Version: 1.9.2
Keywords: Cc:
Blocked by: Blocking:

Description

Hello,

I'm using jQuery 1.9.0 and UI 1.9.2, and found that the combination of the two causes removeClass() without any parameters to pass an argument length of 1, causing it to not remove any classes. I managed to fix it by changing a line in my jQuery file, but that's just a temporary hot fix for my application.

Example of empty removeClass() with jQuery UI: http://jsfiddle.net/nbyCC/3/

Example of empty removeClass() without jQuery UI: http://jsfiddle.net/nbyCC/4/

The line I modified:

proceed = arguments.length === 0 || typeof value === "string" && value;
                               ^

to

proceed = arguments.length === 1 || typeof value === "string" && value;
                               ^

Though I see this as an ugly fix.

Change History (2)

comment:1 Changed 7 years ago by tj.vantoll

Component: ui.coreui.effects.* (individual effect)
Milestone: none1.11.0
Status: newopen
Summary: removeClass() without parameters stops workingEffects: removeClass without parameters does not remove all classes

Verified. When jQuery's docs a call to removeClass with no parameters should remove all classes. When jQuery UI is included this does not happen http://jsfiddle.net/tj_vantoll/KyRMY/.

comment:2 Changed 7 years ago by tj.vantoll

Resolution: duplicate
Status: openclosed

Duplicate of #9015.

Note: See TracTickets for help on using tickets.