diff --git a/camino/src/application/MainController.mm b/camino/src/application/MainController.mm index 91d1c4b6de2..e59ab6e6d24 100644 --- a/camino/src/application/MainController.mm +++ b/camino/src/application/MainController.mm @@ -556,7 +556,7 @@ const int kReuseWindowOnAE = 2; if (openInNewWindow) [self openBrowserWindowWithURL:[(Bookmark *)item url] andReferrer:nil behind:behindWindow allowPopups:YES]; else if (openInNewTab) - [browserWindowController openNewTabWithURL:[(Bookmark *)item url] referrer:nil loadInBackground:newTabInBackground allowPopups:YES]; + [browserWindowController openNewTabWithURL:[(Bookmark *)item url] referrer:nil loadInBackground:newTabInBackground allowPopups:YES setJumpback:NO]; else [browserWindowController loadURL:[(Bookmark *)item url] referrer:nil activate:YES allowPopups:YES]; } @@ -1107,7 +1107,7 @@ Otherwise, we return the URL we originally got. Right now this supports .url, if (tabOrWindowIsAvailable || reuseWindow == kReuseWindowOnAE) [controller loadURL:inURLString referrer:nil activate:YES allowPopups:NO]; else if (reuseWindow == kOpenNewTabOnAE) - [controller openNewTabWithURL:inURLString referrer:aReferrer loadInBackground:loadInBackground allowPopups:NO]; + [controller openNewTabWithURL:inURLString referrer:aReferrer loadInBackground:loadInBackground allowPopups:NO setJumpback:NO]; else { // note that we're opening a new window here diff --git a/camino/src/browser/BrowserTabView.mm b/camino/src/browser/BrowserTabView.mm index 1c1b8396085..b7b3509c810 100644 --- a/camino/src/browser/BrowserTabView.mm +++ b/camino/src/browser/BrowserTabView.mm @@ -471,7 +471,7 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground -(void)addTabForURL:(NSString*)aURL referrer:(NSString*)aReferrer { - [[[self window] windowController] openNewTabWithURL:aURL referrer:aReferrer loadInBackground:YES allowPopups:NO]; + [[[self window] windowController] openNewTabWithURL:aURL referrer:aReferrer loadInBackground:YES allowPopups:NO setJumpback:NO]; } #pragma mark - @@ -492,6 +492,7 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground - (void)setJumpbackTab:(BrowserTabViewItem*)inTab { +NSLog(@"setting jumpback to %d", inTab); mJumpbackTab = inTab; } diff --git a/camino/src/browser/BrowserWindowController.mm b/camino/src/browser/BrowserWindowController.mm index 73f29aa3f30..6a342323cd3 100644 --- a/camino/src/browser/BrowserWindowController.mm +++ b/camino/src/browser/BrowserWindowController.mm @@ -2992,7 +2992,7 @@ enum BWCOpenDest { // jump back to if this new one is closed w/out switching to any other tabs. // This must come after the call to |openNewTab:| which clears the jumpback // tab and changes the selected tab to the new tab. - if (inSetJumpback) + if (inSetJumpback && !aLoadInBG) [mTabBrowser setJumpbackTab:previouslySelected]; [[newTab view] loadURI:aURLSpec referrer:aReferrer flags:NSLoadFlagsNone activate:!aLoadInBG allowPopups:inAllowPopups]; @@ -3014,7 +3014,8 @@ enum BWCOpenDest { // jump back to if this new one is closed w/out switching to any other tabs. // This must come after the call to |openNewTab:| which clears the jumpback // tab and changes the selected tab to the new tab. - [mTabBrowser setJumpbackTab:previouslySelected]; + if (!inLoadInBG) + [mTabBrowser setJumpbackTab:previouslySelected]; return [[newTab view] getBrowserView]; } diff --git a/camino/src/browser/GoMenu.mm b/camino/src/browser/GoMenu.mm index 062d030b9c0..31618c98b3c 100644 --- a/camino/src/browser/GoMenu.mm +++ b/camino/src/browser/GoMenu.mm @@ -432,7 +432,7 @@ static const unsigned int kMaxTitleLength = 50; { BOOL backgroundLoad = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL]; if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL]) - [bwc openNewTabWithURL:itemURL referrer:nil loadInBackground:backgroundLoad allowPopups:NO]; + [bwc openNewTabWithURL:itemURL referrer:nil loadInBackground:backgroundLoad allowPopups:NO setJumpback:NO]; else [bwc openNewWindowWithURL:itemURL referrer: nil loadInBackground:backgroundLoad allowPopups:NO]; } diff --git a/camino/src/history/HistoryOutlineViewDelegate.mm b/camino/src/history/HistoryOutlineViewDelegate.mm index c64eeb8cc48..ceeb6b3e900 100644 --- a/camino/src/history/HistoryOutlineViewDelegate.mm +++ b/camino/src/history/HistoryOutlineViewDelegate.mm @@ -204,7 +204,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat if (cmdKeyDown) { if (openInTabs) - [mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground allowPopups:NO]; + [mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground allowPopups:NO setJumpback:YES]; else [mBrowserWindowController openNewWindowWithURL:url referrer: nil loadInBackground:loadInBackground allowPopups:NO]; } @@ -273,7 +273,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat while ((curItem = [itemsEnum nextObject])) { if ([curItem isKindOfClass:[HistorySiteItem class]]) - [mBrowserWindowController openNewTabWithURL:[curItem url] referrer:nil loadInBackground:backgroundLoad allowPopups:NO]; + [mBrowserWindowController openNewTabWithURL:[curItem url] referrer:nil loadInBackground:backgroundLoad allowPopups:NO setJumpback:YES]; } }