Skip to content

Commit

Permalink
fix: save tab data after auto-reopening parent tab in different conta…
Browse files Browse the repository at this point in the history
…iner
  • Loading branch information
mbnuqw committed Apr 21, 2024
1 parent 5979d7a commit d21f816
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/tabs.fg.handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,10 @@ function onTabRemoved(tabId: ID, info: browser.tabs.RemoveInfo, detached?: boole
newTab.isParent = tab.isParent
newTab.reactive.isParent = tab.isParent
Tabs.forEachDescendant(tab, t => {
if (t.parentId === tab.id) t.parentId = newTab.id
if (t.parentId === tab.id) {
t.parentId = newTab.id
Tabs.saveTabData(t.id)
}
})
break handling_descendants
}
Expand Down

0 comments on commit d21f816

Please sign in to comment.