openfl/openfl-html5 — pull request #14 by cyantree (2013-07-18 11:15:32+00:00)
Title: Error when swaping surfaces

Under certain circumstances adding a child to another displayobjectcontainer can lead to a parentNode = undefined error. Please see the appended demo code:

class Main extends Sprite {
public function new() {
super();

var c:Sprite = new Sprite();

var s:Sprite = new Sprite();
var s2:Sprite = new Sprite();

s.scrollRect = new Rectangle(0, 0, 10, 10);

c.addChild(s2);

c.addChild(s);
c.addChild(s2);
}
}