diff --git a/xpfe/components/prefwindow/resources/content/pref-smart_browsing.js b/xpfe/components/prefwindow/resources/content/pref-smart_browsing.js
index 1c0c7384d83..43a045fbaae 100644
--- a/xpfe/components/prefwindow/resources/content/pref-smart_browsing.js
+++ b/xpfe/components/prefwindow/resources/content/pref-smart_browsing.js
@@ -75,6 +75,7 @@ function removeDomain()
}
selectFirstCell();
rebuildPrefValue();
+ toggleRemoveButton();
}
function rebuildPrefValue()
@@ -126,9 +127,20 @@ function doButtonEnabling()
if (parent.hPrefWindow.getPrefIsLocked(addDomain.getAttribute("prefstring")))
addDomain.disabled = true;
+ toggleRemoveButton();
toggleAutoCompleteAdvancedButton();
}
+function toggleRemoveButton()
+{
+ var domains = document.getElementById("disabledKids");
+ var removeButton = document.getElementById("removeDomain");
+ if (domains.childNodes.length == 0)
+ removeButton.disabled = true;
+ else
+ removeButton.disabled = false;
+}
+
function moreInfo()
{
var browserURL = null;
diff --git a/xpfe/components/prefwindow/resources/content/pref-smart_browsing.xul b/xpfe/components/prefwindow/resources/content/pref-smart_browsing.xul
index 46abd2efc95..c0ca89d3bf4 100644
--- a/xpfe/components/prefwindow/resources/content/pref-smart_browsing.xul
+++ b/xpfe/components/prefwindow/resources/content/pref-smart_browsing.xul
@@ -83,7 +83,8 @@
-