Skip to content

Commit

Permalink
Cycle focus between siblings #3324
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 24, 2023
1 parent 8e7cda0 commit cfb4227
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions webextensions/background/handle-misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,16 @@ async function onShortcutCommand(command) {
TabsInternalOperation.activateTab(activeTab.$TST.lastChild);
return;
case 'focusPreviousSibling':
TabsInternalOperation.activateTab(activeTab.$TST.previousSiblingTab);
TabsInternalOperation.activateTab(
activeTab.$TST.previousSiblingTab ||
activeTab.$TST.parent && activeTab.$TST.parent.$TST.lastChild
);
return;
case 'focusNextSibling':
TabsInternalOperation.activateTab(activeTab.$TST.nextSiblingTab);
TabsInternalOperation.activateTab(
activeTab.$TST.nextSiblingTab ||
activeTab.$TST.parent && activeTab.$TST.parent.$TST.firstChild
);
return;

case 'tabbarUp':
Expand Down

0 comments on commit cfb4227

Please sign in to comment.