DmitryBaranovskiy/raphael — Issue #470: rectangle fill and stroke lost after dom element movement in ie 8 and lower
Author: treppo
Created: 2011-11-28 14:41:27+00:00
State: open

I am working on a project using RaphaelJS 2.0 for drawing rectangle– and text–elements in a canvas. All the rectangles are perfectly drawn with my defined fill and stroke color, even in the VML of IE 8 and lower. But since my canvas resides inside a html–accordion I have to move the canvas parent div ("#canvas") inside the dom from one node to another when the user moves through the accordion layers.

So when I do

$("#moveCanvas").click(function() {
$("#canvas").appendTo("#newCanvasContainer");
};

everything works fine in the SVG–version of the canvas. But in the VML–version of IE 8 and lower all the fill and stroke settings of the rectangle– and text–elements are reset (and look ugly).

I prepared an example at http://jsfiddle.net/W55bW/19/