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

Closing a tab doesn't update the tab count immediately #14

Open
jodizzle opened this issue Nov 1, 2019 · 0 comments
Open

Closing a tab doesn't update the tab count immediately #14

jodizzle opened this issue Nov 1, 2019 · 0 comments

Comments

@jodizzle
Copy link

jodizzle commented Nov 1, 2019

Example:

  • Five tabs open in a window, the addon icon shows the number 5, as expected.
  • Close a tab so that there are now four tabs in total. The addon icon still shows the number 5.
  • Close another tab so that there are now three tabs in total. The addon icon now shows the number 4.

Closing more tabs will continue to reduce the number, but it will remain off by one. Un-focusing then re-focusing the window, pinning/un-pinning a tab, or any other behavior that there's a listener for will re-align the counts.

I think this has something to do with the onRemoved listener triggering too quickly, or possibly the queryNumTabs function counting a tab that's in the process of being closed. I'm not sure what the best fix is.

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