Ticket #3929 (closed defect: fixed)

Opened 16 months ago

Last modified 16 months ago

setClass fails on SVG documents

Reported by: guest Owned by: sjmiles
Priority: normal Milestone:
Component: HTML Version: 0.4
Severity: normal Keywords: setClass svg gfx
Cc:

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

style.patch (455 bytes) - added by guest 16 months ago.

Change History

Changed 16 months ago by guest

Changed 16 months ago by sjmiles

  • version changed from 0.9 to 0.4

Changed 16 months 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.

Changed 16 months ago by sjmiles

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.