clientside/amplesdk — Issue #92: XUL: insertBefore() and toolbarspacer inserts off by one.
Author: h6w
Created: 2011-10-11 05:03:18+00:00
State: open

When inserting a toolbarbutton into a toolbar using the node.insertBefore() or query.insertBefore() methods, and the node reference is a toolbarspacer, the button is inserted correctly into the ample document, but is off by one in the html document.

e.g. http://pastebin.com/tJsUgxHL

In this example, the button should be inserted before the toolbarspacer, and result in all inserted buttons bunched towards "start". Instead, the buttons are inserted to the right of the spacer and are bunched up towards "end".

The console log shows that the resulting ample DOM is correct, however, the html is incorrect.