mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] devtools: Fix devtools in detached window
This commit fixes the issues that were happening when using the devtools in a detached window
This commit is contained in:
committed by
Géry Debongnie
parent
cca4b4bb8e
commit
afd7f957df
@@ -8,8 +8,9 @@ export async function getOwlStatus() {
|
||||
}
|
||||
|
||||
export async function getActiveTabURL() {
|
||||
const [tab] = await browserInstance.tabs.query({ active: true, lastFocusedWindow: true });
|
||||
return tab.id;
|
||||
const window = await browserInstance.windows.getLastFocused({ populate: true });
|
||||
const activeTab = window.tabs.find((tab) => tab.active);
|
||||
return activeTab.id;
|
||||
}
|
||||
|
||||
// inspired from https://www.tutorialspoint.com/fuzzy-search-algorithm-in-javascript
|
||||
|
||||
Reference in New Issue
Block a user