From 3ea58979d5dbcd647b4bf4c057b00a5c4db85b7a Mon Sep 17 00:00:00 2001 From: buttercookie42 Date: Sat, 20 Aug 2016 13:52:16 +0200 Subject: [PATCH] Support back button navigation on Android (#1917) When opening a new tab in Fennec, we should pass the ID of the current tab as parentId, so that pressing the back button afterwards closes the new tab and returns to the original tab instead of just closing Firefox. --- platform/firefox/vapi-background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 5e128cf5d..f67823b7d 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1000,7 +1000,8 @@ vAPI.tabs.open = function(details) { if ( vAPI.fennec ) { tabBrowser.addTab(details.url, { - selected: details.active !== false + selected: details.active !== false, + parentId: tabBrowser.selectedTab.id }); // Note that it's impossible to move tabs on Fennec, so don't bother return;