fix(tabs): lock automation to selected window

This commit is contained in:
朴圣佑
2026-05-12 11:06:56 +08:00
parent ec3c3808e6
commit 2bb34f9064
13 changed files with 682 additions and 36 deletions
+4 -1
View File
@@ -35,6 +35,7 @@
broadcastDataUpdate,
chrome,
closeLocalhostCallbackTabs,
createAutomationTab = null,
getState,
setState,
} = deps;
@@ -437,7 +438,9 @@
}
if (!tab) {
tab = await chrome.tabs.create({ url: normalizedUrl, active: true });
tab = typeof createAutomationTab === 'function'
? await createAutomationTab({ url: normalizedUrl, active: true })
: await chrome.tabs.create({ url: normalizedUrl, active: true });
}
await applyRuntimeUpdates({