-
Notifications
You must be signed in to change notification settings - Fork 280
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
Some new tabs open as independent no matter what #2397
Comments
There was a similar discussion. Please check my comment about this topic: #2391 (comment) |
Interesting. However, it seems like if a Firefox window is the active window (I don't know if you can detect this), and a new tab is opened, generically speaking, then it should be the child of the currently active tab, since either the page opened it (the semantic tab-to-tab relationship you speak of) or I did, knowing that tab was active (intent of the user implying the relationship). In the case where no Firefox window is the system active one, or where you can't tell whether this is the case or not, yes, I could see it being a problem trying to figure out how to do anything meaningful with that. At any rate, the other guy's suggestion of using the "Open Tabs Next to Current" addon led me to the |
Thanks to advises! Inspired from your comment, I've researched again around WebExtensions API about window focus, and I've realized that Firefox provides ability to know the window is really active or not. This means that we can narrow down the context of a new tab open with window focus, like:
Sadly new tabs from I have another idea: a special detection like "when a new tab with addon page is opened while |
I've implemented the idea I wrote at the last my comment, with 86297bb. Now search result tabs will become child of the addon manager tab - when both two tabs match to a specific pattern: the parent is |
I just tried it and the specific case I mentioned ( It seems like the right approach should be to assume any new tab is the child of the currently active tab, and then carve out exceptions from there, rather than the other way around… |
I think we need to be careful seriously about guessing implicit relations of a new tab and the active tab. Carelessly done aggressive guessings may break things - it's horrible. TST is basically designed very conservative about this point. If you can specify the relation of a new tab and the active tab explicitly, you should do that. On your case, the addon Resurrect Pages should specify Thus I think that we need to ask/recommend more addon authors to use the |
I'll give the author of that addon a report about that, thanks. But out of curiosity, what is it that goes wrong in making the assumption I posed? |
Ah, I've already created a pull request: arantius/resurrect-pages#44 |
Oh haha sorry! |
I also tried it with View Page Archive & Cache, and at first I was seeing the same problem. But after trying again some time later, its new tabs do open as children of the current tab, but somehow ignore the setting to open as the last child, instead opening as the first. Strange… |
Guys, anything more do be done here or can we close this one out? |
Nothing has been done on the other tickets I opened in the other projects nor the pull requests piroor made, but I suppose unless we're considering changing the assumptions about intent as discussed earlier, then probably that's it for this one…? |
I guess I was thinking that if there wasn't anything to be done on the TST side we could close this out. I do realize that @piroor has been helping to get the other addons to make changes on their side and I am sure he will continue to help as possible even with this issue closed. (Basically, I don't think we necessarily want to wait till everything is fixed with the other addons until we close this) |
@piroor can we close this one? |
Short description
There are some ways to make new tabs open for which there doesn't seem to be any way to control the TST behavior.
Steps to reproduce
(Other methods can do the same — for example, using the Resurrect Pages addon. But for a clean install, this illustrates the issue:)
Expected result
New tab is a child of the current one
Actual result
New tab is independent (top level tab, at the end of the tree)
Environment
The text was updated successfully, but these errors were encountered: