Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Fix for "open new tabs next to current" #128

Open
wants to merge 1 commit into
base: Fixed
Choose a base branch
from

Conversation

Kamui-Solo
Copy link

For example check option "open new tabs next to current" to "all", then press ctrl+shift+a to open addon manager, it will be opened outside of tab stack. This fix is for option works properly in all cases.

For example check option "open new tabs next to current" to "all", then press ctrl+shift+a to open addon manager, it will be opened outside of tab stack. This fix is for option works properly in all cases.
Copy link
Owner

@yfdyh000 yfdyh000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain or cancel the changes for shouldStack?

@@ -697,7 +697,7 @@ tabutils._tabOpeningOptions = function() {
if ((function() {
switch (TU_getPref("extensions.tabutils.openTabNext", 1)) {
case 1: //All
case 2: return aRelatedToCurrent || aReferrerURI || (aURI != "about:blank" && aURI != "about:newtab"); //All but New Tab
case 2: return aRelatedToCurrent || aReferrerURI || !isBlankPageURL(aURI); //All but New Tab
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again (lost from Github's review process): Good catch! It utilizes the gInitialPages in isBlankPageURL function.

@Kamui-Solo
Copy link
Author

Kamui-Solo commented Feb 1, 2017

Can you explain or cancel the changes for shouldStack?

It seems new tab page or addon manager page and in my case "simple mail" page, which opened from toolbar, they dosn't have referrer at all. And when we use:
args.aReferrerURI || args.aRelatedToCurrent
They are absolutely ignored for stacking even if checked "all" in option "open new tabs next to current"
We can use:
function shouldStack(tab) { let args = tab.arguments; return args.aURI != "about:blank"; }
But I'm not tested it yet.

@yfdyh000
Copy link
Owner

yfdyh000 commented Feb 3, 2017

@Kamui-Solo Why the new non-relevant tab (like from toolbar, rather than the current tab) should be auto stack?
If you remove the change, I'll be happy to merge it.

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

Successfully merging this pull request may close these issues.

2 participants