Skip to content

Commit cf593f1

Browse files
committed
fix: ensure reloadButton disabled when none selected
Addressing a regression in 3.6.2 whereby the reload button was inadvertently enabled when no items were selected. Also fixup the doReloadTabs action so it filters-out discarded items rather than filters them in.
1 parent e36c91f commit cf593f1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
TARGET=firefox
2-
VERSION=3.6.3
2+
VERSION=3.6.4
33

44
TDIR=build/${TARGET}
55
TBDIR=$(TDIR)/build

popup/tabhunter.js.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ function updateButtons() {
11981198
document.getElementById("go").disabled = selectedItemLength != 1 || matchedItemLength == 0;
11991199
closeTabsButton.disabled = otherDisabled;
12001200
const selectedActualIndices = selectedItems.map(elt => elt.actualIndex);
1201-
reloadTabsButton.disabled = selectedActualIndices.some(i => items[i].discarded);
1201+
reloadTabsButton.disabled = selectedItemLength == 0 || selectedActualIndices.some(i => items[i].discarded);
12021202
selectAllButton.disabled = matchedItems.length == 0;
12031203
document.getElementById("copyURL").disabled = otherDisabled;
12041204
document.getElementById("copyTitle").disabled = otherDisabled;
@@ -1594,7 +1594,7 @@ function activateTheTabs() {
15941594

15951595
function doReloadTabs() {
15961596
var selectedItems = getSelectedItemsJQ();
1597-
var selectedActualIndices = selectedItems.filter(item => item.discarded).map(function(elt) { return elt.actualIndex });
1597+
var selectedActualIndices = selectedItems.filter(item => !item.discarded).map(function(elt) { return elt.actualIndex });
15981598
var actualItems = selectedActualIndices.map((i) => items[i]);
15991599
var tabIDs = actualItems.map((item) => item.tabID);
16001600
if (tabIDs.length == 0) {

0 commit comments

Comments
 (0)