Opened 12 years ago

Closed 12 years ago

#3929 closed defect (fixed)

setClass fails on SVG documents

Reported by: guest Owned by: sjmiles
Priority: high Milestone:
Component: HTML Version: 0.4
Keywords: setClass svg gfx Cc:
Blocked By: Blocking:

Description

This is related to ticket #3878, and could be seen as an extension. But, different failure, different bug. dojo.html.setClass almost works on an SVG document node. It fails when it tries to assign the node className directly from a string after calling node.setAttribute ("class", classStr);

There is probably some platform where the assignment is necessary. I've attached a patch that leaves the assignment, but fixes the exception on SVG document nodes.

Attachments (1)

style.patch (455 bytes) - added by guest 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by guest

Attachment: style.patch added

comment:1 Changed 12 years ago by sjmiles

Version: 0.90.4

comment:2 Changed 12 years ago by guest

Yep, good catch on the version change.

I discovered the fix for this in 0.9 in dojox/gfx/_base.js, _hasClass, _addClass, etc... They've been suggested as improvements for inclusion in dojo mainline.

comment:3 Changed 12 years ago by sjmiles

Resolution: fixed
Status: newclosed

(In [10067]) Fix getClass/setClass to be SVG friendly (0.4 trunk), fixes #3929, fixes #3878.

Note: See TracTickets for help on using tickets.