Opened 12 years ago
Closed 12 years ago
#8430 closed defect (fixed)
dojox.gfx._removeClass fails if there are no classes yet
Reported by: | Christian Schröder | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | DojoX GFX | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
if a node does not have any class the _removeClass method will fail, because it will dereference on null.
i attched a patch checking for null first and returning immediately if the className attribute is null.
Attachments (1)
Change History (7)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
_hasNode also hs null issue, if the class esked for is named null.
updated patch
also the attribute name is possibly wrong. in FF3 on Ubuntu 8.10 it only works if i set the attribute named "class" not "className" this hs to be digged in further. i won't include this into the patch.
Changed 12 years ago by
Attachment: | dojo-patch.txt added |
---|
fix for _removeClass, _addClass and _hasClass in dojox.gfx
comment:3 Changed 12 years ago by
Component: | General → DojoX GFX |
---|---|
Milestone: | tbd → future |
Owner: | changed from anonymous to Eugene Lazutkin |
Status: | new → assigned |
comment:4 Changed 12 years ago by
ok, according to http://www.w3.org/TR/SVG/styling.html#ClassAttribute the attribute really should be named "class"
comment:5 Changed 12 years ago by
Milestone: | future → 1.3 |
---|
I updated these functions.
Interesting that they are not used on dojox.gfx. How do you use them and why?
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
dojo.gfx._addClass also has a null issue i updated the patch