-
Notifications
You must be signed in to change notification settings - Fork 1
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
Switching tabs via search sets last tab incorrectly #30
Comments
A little trickier than I thought initially because once you open up a tab search tab, it becomes the current tab and you don't want to save it as the last tab since it gets closed once the user makes a selection. So we actually need to save the tab right before we open up the tab search tab (but also keep the tab before that, in case tab search gets cancelled/not used). |
Even trickier: there's another separate case if the user clicks the KeepTabs icon to open up the tab search popup, rather than using the hotkey to open up tab search in a separate tab. In this latter case, the background script isn't involved at all -- the tab search page is brought up because it is specified as the popup behavior. We can solve both of these cases and reuse code by doing the actual navigation in the background script, just sending over the tab and window ids from the tab search page as a message. This way the tab search page closes itself in either case, and then the background script can use the standard behavior (save current tab as |
The problem with my previous suggestion is that when you close the tab search (in the case when it's in a new tab, called by hotkey) the browser defaults to going to the next left tab, not the one you opened tab search from. This messes up the Separately, I also forgot to address the issue mentioned in my other comment: that it would be nice to preserve the old Hotkey flow
Popup flow
|
After implementing the above, I observe one small problem. Because the |
Okay, fixed the problem immediately above. I'm now realizing that because I used |
This comment moved to a new issue #44. |
Because switching tabs via search occurs in a separate page (the
tab_search.html
popup) with a separate JS script, it's a little tricky to update the globallast_tab_id
which resides in the background script (probably need to send a message), so I left this out of 2f6caec and just implemented the core functionality of #14. But we should fix it to work after tab search too.The text was updated successfully, but these errors were encountered: