Comment on attachment 8781962
middlemouse on new tab button should create a new tab related to current,
> function BrowserOpenNewTabOrWindow(event) {
>- if (event.shiftKey) {
>+ let where = whereToOpenLink(event);
>+ if (where == "window") {
> OpenBrowserWindow();
> } else {
>- BrowserOpenTab();
>+ // Make new tab related to current except when created via a shortcut <key> command.
This comment doesn't seem accurate, e.g. we don't want to open the tab related to the current one for plain clicks... right?
>+ let sourceNotKeyEvent = !event.sourceEvent || event.sourceEvent.target.localName != "key";
>+ let relatedToCurrent = (where == "tab" || where == "tabshifted") && sourceNotKeyEvent;
>+ openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {relatedToCurrent,
>+ inBackground: where == "tabshifted"});
I'm somewhat confused by this. Why are you not passing through "tabshifted" as openUILinkIn's 'where' argument?
Comment on attachment 8781962
middlemouse on new tab button should create a new tab related to current,
> function BrowserOpenNewT abOrWindow( event) { (event) ; ow();
>- if (event.shiftKey) {
>+ let where = whereToOpenLink
>+ if (where == "window") {
> OpenBrowserWind
> } else {
>- BrowserOpenTab();
>+ // Make new tab related to current except when created via a shortcut <key> command.
This comment doesn't seem accurate, e.g. we don't want to open the tab related to the current one for plain clicks... right?
>+ let sourceNotKeyEvent = !event.sourceEvent || event.sourceEve nt.target. localName != "key"; BROWSER_ NEW_TAB_ URL, "tab", {relatedToCurrent,
>+ let relatedToCurrent = (where == "tab" || where == "tabshifted") && sourceNotKeyEvent;
>+ openUILinkIn(
>+ inBackground: where == "tabshifted"});
I'm somewhat confused by this. Why are you not passing through "tabshifted" as openUILinkIn's 'where' argument?