mozilla / personas-plus

Personas Plus extension for Firefox
https://addons.mozilla.org/addon/personas-plus/
Mozilla Public License 2.0
8 stars 11 forks source link

Tab Support for SeaMonkey #78

Closed derinb closed 8 years ago

derinb commented 8 years ago

Tab Support for SeaMonkey. SeaMonkey adds tab but makes it background which may lead user miss the opened tab. This PR makes sure SeaMonkey behaves like Firefox.

This does not alter Firefox behaviour. Firefox still opens tab at the end of tab strip and as selected active tab.

wagnerand commented 8 years ago

According to the docs for loadOneTab if inBackground is not specified, it will default to browser.tabs.loadInBackground. If we're using loadOneTab we should respect that setting.

Why don't you just use addTab?

derinb commented 8 years ago

Oh I forgot that preference.

But probably addTab also will load the tab as background tab for SeaMonkey. It does not select the tab.

gBrowser.selectedTab = gBrowser.addTab

may fix it but it will not be different than

tabBrowser.loadOneTab(url, {inBackground: false});

Should I try?

var pref = getPrefValue("browser.tabs.loadInBackground");

tabBrowser.loadOneTab(url, {inBackground: **pref**});
wagnerand commented 8 years ago

I think we should either use addTab(url) or loadOneTab(url). If SeaMonkey has a different behavior when it comes to opening tabs, we should respect that and not simply ignore it.

derinb commented 8 years ago

OK I am closing this PR. Current openUILinkIn does not behave any other than loadOneTab.