mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Reapply PR #1150 "Only cycle through visible tabs"
It seems the actual change in PR #1150 (a09a771
) has been lost in its merge (6562699
). This should now actually fix Issue #1084 and ignore hidden tabs when cycling through tabs.
This commit is contained in:
parent
10a6598c32
commit
9ad3e09c79
1 changed files with 1 additions and 1 deletions
|
@ -1704,7 +1704,7 @@ export async function tabprev(increment = 1) {
|
|||
// Proper way:
|
||||
// return tabIndexSetActive((await activeTab()).index - increment + 1)
|
||||
// Kludge until https://bugzilla.mozilla.org/show_bug.cgi?id=1504775 is fixed:
|
||||
return browser.tabs.query({ currentWindow: true }).then(tabs => {
|
||||
return browser.tabs.query({ currentWindow: true, hidden: false }).then(tabs => {
|
||||
tabs = tabs.sort((t1, t2) => t1.index - t2.index)
|
||||
let prevTab = (tabs.findIndex(t => t.active) - increment + tabs.length) % tabs.length
|
||||
return browser.tabs.update(tabs[prevTab].id, { active: true })
|
||||
|
|
Loading…
Add table
Reference in a new issue