summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/preferences/cookies.js
diff options
context:
space:
mode:
Diffstat (limited to 'application/basilisk/components/preferences/cookies.js')
-rw-r--r--application/basilisk/components/preferences/cookies.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/basilisk/components/preferences/cookies.js b/application/basilisk/components/preferences/cookies.js
index 921eee4c0..3529a4159 100644
--- a/application/basilisk/components/preferences/cookies.js
+++ b/application/basilisk/components/preferences/cookies.js
@@ -565,6 +565,8 @@ var gCookiesWindow = {
onCookieSelected: function () {
var item;
var seln = this._tree.view.selection;
+ var hasRows = this._tree.view.rowCount > 0;
+ var hasSelection = seln.count > 0;
if (!this._view._filtered)
item = this._view._getItemAtIndex(seln.currentIndex);
else
@@ -592,7 +594,7 @@ var gCookiesWindow = {
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel)
.replace("#1", selectedCookieCount);
- removeSelectedCookies.disabled = !(seln.count > 0);
+ removeSelectedCookies.disabled = !hasRows || !hasSelection;
},
performDeletion: function gCookiesWindow_performDeletion(deleteItems) {