1

I am the developer of a Chrome extension called xTab which allows you to limit the number of tabs open in the browser at any given time. I have been testing out the extension in Orion, and I noticed that sometimes it doesn’t allow as many tabs to be open as configured in the UI.

Under the hood, the extension uses chrome.tabs.query({}) to find the active tabs. It makes the request in real time when you attempt to open a new tab. I noticed that in some cases the call returns tabs that I have already closed. I haven’t quite figured out the specific steps to reproduce, but it seems to happen if you have the browser open for a while. Perhaps something to do with unloaded/sleeping tabs? I also think it may happen when I close tabs by clicking the x next to them without first navigating to the tabs.

I expect the call to only return tabs that are open. Could it be that there are certain paths to close tabs in Orion that don’t remove them from the list of active tabs?

I am happy to provide any additional information, but I don’t know exactly what triggers it right now. Thank you.

Version 0.99.127.3-beta (WebKit 619.1.1) Sonoma 14.5

Sonoma (14)

    5 days later
    8 days later

    One more note on this. The actual call I use by default in the extension is chrome.tabs.query({currentWindow: true}).

    I set up a couple window groups of saved windows, and the chrome.tabs.query({currentWindow: true}) seems to include tabs even from inactive saved window groups (might only happen after you have switched to that saved window and back). Personally I would expect chrome.tabs.query({currentWindow: true}) to only return tabs that are open and visible in the current window.

    Even if you were to pass {} to get a list of all tabs open, I think the expected behavior would be to only include tabs that are open and visible, not ones that are in saved windows.

      No one is typing