Bug 825016 - Part 1 - When opening a new tab, pass the ID of the parent tab. r=zer0
This ensures that when hitting back, we return to the previously opened tab.
MozReview-Commit-ID: 287AOQnmwxb
--- a/addon-sdk/source/lib/sdk/tabs/utils.js
+++ b/addon-sdk/source/lib/sdk/tabs/utils.js
@@ -133,17 +133,18 @@ function getWindowHoldingTab(rawTab) {
function openTab(window, url, options) {
options = options || {};
// fennec?
if (window.BrowserApp) {
return window.BrowserApp.addTab(url, {
selected: options.inBackground ? false : true,
pinned: options.isPinned || false,
- isPrivate: options.isPrivate || false
+ isPrivate: options.isPrivate || false,
+ parentId: window.BrowserApp.selectedTab.id
});
}
// firefox
let newTab = window.gBrowser.addTab(url);
if (!options.inBackground) {
activateTab(newTab);
}