Feature #918


Consider displaying an undo snackbar when a tab is closed

Added by Sam Jones 7 months ago. Updated 7 months ago.

Start date:
Due date:
% Done:


Estimated time:


On the android version ... is there a way to open a new tab AND NOT have the keyboard in my face ?

Many of us open tabs and use bookmarks for them.

That use case is already handled by long-pressing on a bookmark, which opens it in a new tab.

Perhaps it would be helpful if opening a bookmark in a new tab also switched to that tab. Do you think that would be a good idea?

I see how the long click works to open bookmark in new tab. Great.

But I also have a tendency to click the back arrow on tabs that are at the top of their history. This closes the tab completely.

Can the back arrow work as normal to climb the history back to the top, and if one is already at the top on that tab, change the focus to the previous or tab to the left and not closed the current tab.

Quote #7
Updated by Soren Stoutner 2 days ago
Using the system back command to close tabs is one of my favorite parts of Privacy Browser and one of what I consider to be the best parts of its user interface. As such, I am unlikely to change that behavior.

Quote #8
Updated by Sam Jones 1 day ago
I guess my crutch is that I spend more time with Private Browser on an older small moto-e phone with and earlier version with no tabs, just single page (2.8.1). Limited memory and screen space there so I am fine with that version there. And on that I constantly go to bookmarks and 'back click' return to the original home page therein.

For me if I want to close a page you have the 'X' on the left to use.

It would be nice to have a choice as to your 'close' choice or my suggestion to go to previous tab if history is at top level.

Thanks for listening, you do great work.


Ghosted Back Entry.png (119 KB) Ghosted Back Entry.png Soren Stoutner, 11/16/2022 11:07 AM
Actions #1

Updated by Soren Stoutner 7 months ago

  • Status changed from New to Feedback
  • Assignee set to Soren Stoutner changed the opening of a bookmark in a new tab to also switch to that tab, so I won't address that here.

Regarding the issue of the system back button, I am generally reluctant to create options to modify the GUI, both because this creates a heavy maintenance burden (every code path that relates to each of these options has to be tested every time anything related to them changes) and because having too many options to modify the GUI can make the settings confusing to users.

I have made an exception for a few aspects of the GUI. For example, there are options in the settings to move the app bar to the bottom of the screen or to enable full-screen browsing mode.

In this case, I am not inclined to create an option. First, because I don't think many people would use it. Second, because it is not clear to me what the desired behavior should be. For example, using back to switch to a different tab doesn't seem like it would flow well in all circumstances, especially if a tab was opened by an intent from clicking a link in another app.

However, I will leave this feature request open for a while. If a large number of users would desire this feature and can agree on how it should behave I might be willing to reconsider.

Actions #2

Updated by Sam Jones 7 months ago

Just updating you ...

I mistakenly killed 10 tabs in the last 6 days. Can you at least allow us to do what every browser in the world does ? When at the top of the history, the back button is greyed out and does nothing. Just make your back arrow do nothing under 'top of the history' condition. Or allow us this choice.

Actions #3

Updated by Soren Stoutner 7 months ago

The system back button should always do something in Android. It is unacceptable to have it not do anything. In addition, if a user taps the system back button enough times the final result should always be closing the app and going back to the launcher screen.

On Google Chrome, for example, the system back button navigates backwards in the tab history. If the tab it at the top of its history, then it closes the app.

The only difference between Google Chrome and Privacy Browser in this regard is that Privacy Browser does not save browsing data when it is closed. This is according to Privacy Browser's core privacy principles as described at "From time to time I receive requests to add features to Privacy Browser that automatically store comprehensive histories across reboots or restore tabs on a restart. Although I can see the usefulness of such features, I am opposed to anything that automatically stores a browsing history just by engaging in normal browsing behaviors. Doing so makes it easy for malicious apps or devices made by companies like Cellebrite to extract browsing history from user devices without consent. As such, these type of features are unlikely to ever be implemented."

Actions #4

Updated by राही अखेराजोत 7 months ago

I suggest that Privacy Browser should warn the user before closing a tab (make it optional).

Toast Press BACK button again to close this tab

Actions #5

Updated by Soren Stoutner 7 months ago

  • Subject changed from giving user choice of just what the Back arrow does under different conditions to Consider warning users before closing tabs

I personally really dislike when apps display such messages. However, I wouldn't be completely opposed to adding such an option (disabled by default) if there was enough interest among users.

Actions #6

Updated by Sam Jones 7 months ago

I'm not asking for any message. Simply ignore Back button if at top of history for this tab. I have the 'X' if I want to close tab.

Actions #7

Updated by Soren Stoutner 7 months ago

As mentioned previously, the back button should never do nothing in Android. You can read more about how the system back button should behave at the following URLs:

Actions #8

Updated by Sam Jones 7 months ago

Just looking now in a tab. Can't even tell on-screen that I am at the top of the history (so I can avoid an unintended closure of the tab). How about an Undo dialog .. that's in Chromium isn't it ?

Actions #9

Updated by Soren Stoutner 7 months ago

You can tell if you are at the top of a WebView history when the back entry in the navigation menu is ghosted (see attached screenshot).

Android's WebView is based on the Chromium codebase, but Privacy Browser itself does not share any code with Chromium.

Having an undo snackbar instead of a warning would probably be a better idea. However, I still can't imagine that many users would end up enabling it, because it would be fairly annoying to have something pop up on the screen every time a tab was closed. Also, from a programming perspective, creating an undo option is very complicated. Not that I turn away from doing complicated things if they are important, but I don't often go down that route unless it is something that would actually be used.

Actions #10

Updated by Soren Stoutner 7 months ago

I think the core of the issue is that the system back button is supposed to get whatever you are currently looking at on the screen off the screen. You are tapping the system back button but then being surprised when it does exactly what it is supposed to do. Irrespective of whatever value there is in implementing an undo option, after reading all of what has been posted here I come away convinced that the system back button is doing exactly what is should do in Privacy Browser.


Also available in: Atom PDF