From 640f9ed3a5165b87644aa40342c62bc17f3ec4d7 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 24 Jun 2018 12:20:08 +0200 Subject: Preferences - Show Cookies - "Remove Selected" button should not be active if there are no items --- application/palemoon/components/preferences/cookies.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'application/palemoon/components') diff --git a/application/palemoon/components/preferences/cookies.js b/application/palemoon/components/preferences/cookies.js index 4ef30d48e..74ec3d1d2 100644 --- a/application/palemoon/components/preferences/cookies.js +++ b/application/palemoon/components/preferences/cookies.js @@ -540,6 +540,8 @@ var gCookiesWindow = { onCookieSelected: function () { var properties, 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 @@ -570,7 +572,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) { -- cgit v1.2.3