feat: Close tab and switch to recent tab when going back with no history, p=#11190

Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
Kyle Kincer
2025-11-09 12:32:13 -05:00
committed by GitHub
parent c382001253
commit 421adade52
7 changed files with 72 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/browser/base/content/browser-gestureSupport.js b/browser/base/content/browser-gestureSupport.js
index a28d54bf72c0e6495b9586f220d1859aac794936..66154668b9f85ffbaacea1e8351370659260227b 100644
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -832,7 +832,7 @@ var gHistorySwipeAnimation = {
* @return true if there is a previous page in history, false otherwise.
*/
canGoBack: function HSA_canGoBack() {
- return gBrowser.webNavigation.canGoBack;
+ return gBrowser.webNavigation.canGoBack || gZenCommonActions.shouldCloseTabOnBack();
},
/**