In https://github.com/aklinker1/webext-core/blob/3b4fc4778e02be15709271af87624c25bb139c49/packages/fake-browser/src/apis/tabs.ts
fakeBrowser.tabs.create({ active: true }) creates a new tab, but it doesn't actually update activeTabId variable,
so fakeBrowser.tabs.query({ active: true }) is unable to find the active tab.
When I run
fakeBrowser.reset();
await fakeBrowser.tabs.create({ active: true });
console.log(await fakeBrowser.tabs.query({}));
the following log is output:
[
{
id: 0,
index: 0,
highlighted: false,
incognito: false,
pinned: false,
windowId: 0,
active: false
},
{
highlighted: false,
incognito: false,
index: 0,
pinned: false,
windowId: 0,
id: 1,
url: undefined,
active: false
}
]
In https://github.com/aklinker1/webext-core/blob/3b4fc4778e02be15709271af87624c25bb139c49/packages/fake-browser/src/apis/tabs.ts
fakeBrowser.tabs.create({ active: true })creates a new tab, but it doesn't actually updateactiveTabIdvariable,so
fakeBrowser.tabs.query({ active: true })is unable to find the active tab.When I run
the following log is output: