From f3919fb5e6ab3c3f8988e7ea9b243bddec130ee4 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 24 Jun 2018 12:25:14 +0200 Subject: [PATCH] Preferences - Show Cookies - /"onCookieSelected" is not fired twice --- application/basilisk/components/preferences/cookies.js | 4 +++- application/palemoon/components/preferences/cookies.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/application/basilisk/components/preferences/cookies.js b/application/basilisk/components/preferences/cookies.js index 3529a41590..c420855f89 100644 --- a/application/basilisk/components/preferences/cookies.js +++ b/application/basilisk/components/preferences/cookies.js @@ -808,7 +808,9 @@ var gCookiesWindow = { this._view._invalidateCache(0); this._view.selection.clearSelection(); - this._view.selection.select(0); + if (this._view.rowCount > 0) { + this._view.selection.select(0); + } this._tree.treeBoxObject.invalidate(); this._tree.treeBoxObject.ensureRowIsVisible(0); diff --git a/application/palemoon/components/preferences/cookies.js b/application/palemoon/components/preferences/cookies.js index 74ec3d1d23..4fa47ee4ed 100644 --- a/application/palemoon/components/preferences/cookies.js +++ b/application/palemoon/components/preferences/cookies.js @@ -788,7 +788,9 @@ var gCookiesWindow = { this._view._invalidateCache(0); this._view.selection.clearSelection(); - this._view.selection.select(0); + if (this._view.rowCount > 0) { + this._view.selection.select(0); + } this._tree.treeBoxObject.invalidate(); this._tree.treeBoxObject.ensureRowIsVisible(0);