Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Possible Bug] Tab id changes when suspending and un-suspending a tab. #1077

Open
kalpaj12 opened this issue Jan 4, 2020 · 0 comments
Open

Comments

@kalpaj12
Copy link

kalpaj12 commented Jan 4, 2020

  • Extension version: 7.1.0
  • Browser name & version: Chrome 79.0.3945.88 (Official Build) (64-bit)
  • Operating system & version: Kubuntu on 5.3.0-24-generic

I am trying to create a chrome extension, that removes duplicate tabs while using thegreatsuspender, however, tabid's change when suspending and un-suspending a tab, and hence I can't use

 chrome.tabs.get(tabId, function(tab) {
        if (tab && tab.id) {
            chrome.tabs.remove(tab.id);
        }
    });

if duplicates exists, and I need to get rid of them.

Steps to Reproduce:

  1. Using Chrome's api, note down all the open tab's info.
 chrome.tabs.query({}, function(tabs) {
        console.log(tabs);
    });
  1. Click Suspend all other tabs from thegreatsuspender's pop-up menu.

  2. Unsuspend all tabs, after a minute or so, [from the pop-up menu.]

  3. Query tab info again [code from step 1], this time, all the tabs have different tab id's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant