Opened 7 years ago

Closed 7 years ago

#16160 closed defect (invalid)

removing class from node with no classes using domClass.remove causes a class "undefined" to be added

Reported by: Mark DeMichele Owned by:
Priority: undecided Milestone: tbd
Component: HTML Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

If you have a node with no "className" value and you try to remove a non-existent class, it will actually add a "undefined" class to your node.

You may wonder why I'm doing this. I have a dijit for which the caller sets a property. Based on that property, I need to set a particular class. Before I set the class, I attempt to remove the other classes I'm responsible to for setting. I do this blindly because the docs say there's no need to call contains when using remove.

Change History (2)

comment:1 Changed 7 years ago by Mark DeMichele

Hmmmm. This may be my fault. I just realized that I'm setting it accidentally on the dijit and not the dijit domNode. (Sorry for the false report).

comment:2 Changed 7 years ago by bill

Component: CoreHTML
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.