Skip to content

Commit

Permalink
More debuggable log
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed May 24, 2024
1 parent 8fee6be commit 886de2a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions webextensions/background/successor-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,17 @@ async function updateInternal(tabId) {
closeParentBehavior != Constants.kPARENT_TAB_OPERATION_BEHAVIOR_REPLACE_WITH_GROUP_TAB
);
const firstChild = collapsedChildSuccessorAllowed ? tab.$TST.firstChild : tab.$TST.firstVisibleChild;
successor = firstChild || tab.$TST.nextVisibleSiblingTab || tab.$TST.nearestVisiblePrecedingTab;
log(` possible successor: ${dumpTab(tab)}: `, successor, { closeParentBehavior, collapsedChildSuccessorAllowed, firstChild });
const nextVisibleSibling = tab.$TST.nextVisibleSiblingTab;
const nearestVisiblePreceding = tab.$TST.nearestVisiblePrecedingTab;
successor = firstChild || nextVisibleSibling || nearestVisiblePreceding;
log(` possible successor: ${dumpTab(tab)}: `, successor, {
closeParentBehavior,
collapsedChildSuccessorAllowed,
parent: tab.$TST.parentId,
firstChild: firstChild?.id,
nextVisibleSibling: nextVisibleSibling?.id,
nearestVisiblePreceding: nearestVisiblePreceding?.id,
});
if (successor &&
successor.discarded &&
configs.avoidDiscardedTabToBeActivatedIfPossible) {
Expand Down

0 comments on commit 886de2a

Please sign in to comment.