Bug 930950: also remove location attributes when a widget is removed. r=Gijs

This commit is contained in:
Mike de Boer 2013-11-18 13:01:46 +01:00
parent 1e3930ad3d
commit 19faa52e2c

View File

@ -599,10 +599,12 @@ let CustomizableUIInternal = {
this.notifyListeners("onWidgetBeforeDOMChange", widgetNode, null, container, true);
// We remove location attributes here to make sure they're gone too when a
// widget is removed from a toolbar to the palette. See bug 930950.
this.removeLocationAttributes(widgetNode);
if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) {
container.removeChild(widgetNode);
} else {
this.removeLocationAttributes(widgetNode);
widgetNode.removeAttribute("tabindex");
if (widgetNode.getAttribute("type") == "wrap") {
widgetNode.removeAttribute("type");