focus-android icon indicating copy to clipboard operation
focus-android copied to clipboard

Add confirmation before clearing browsing history due to back button

Open dillburt opened this issue 9 years ago • 9 comments

Using the back button to return to the start screen causes the browsing history to be erased. Sometimes I do this accidentally, and since the history was cleared, I can't go "forward" to get back where I was.

To address this, I suggest adding the option to have a confirmation before clearing the history when triggered via the back button.

dillburt avatar Sep 08 '17 01:09 dillburt

It happens to me also to miss the back button and touch the erase button.

@pocmo maybe I could handle this (????).

layely avatar Sep 08 '17 03:09 layely

Flagging this for our bug triage meeting.

Personally I'm not a fan of a confirmation - it interrupts the flow and forces the user to make a decision every time.

@spocko To understand your problem better: Is it that you accidentally hit 'back' or are you navigating back in your web history and then at some point drop out of Focus accidentally (-> #1195)

pocmo avatar Sep 08 '17 08:09 pocmo

This is very similar to issue #1195, but my concern is not about exiting the app accidentally, it's about clearing the history accidentally. In the current version of the app, I don't think it's really possible to exit the app accidentally, because the back button always takes you back to the start screen before exiting. (see Edit below)

My scenario is that I'm intentionally using the back button to navigate back in my web history, but accidentally hit back too many times and therefore arrive back at the start screen. If I do that, then my history is automatically cleared, and I have then lost the ability to go forward to get back to the url that I started with.

I understand your point about a confirmation, so maybe that is not the best solution. More generally I'm looking for some way to avoid unintentionally clearing the history when using the back button.

A simple solution might be to clear history when exiting the app (i.e. one more press of the back button) instead of clearing it when returning to the start screen. Then if a user accidentally navigates back to the start screen, their history would still be available, so they could go forward to get back where they were. If they want to clear history and exit, they just need to hit the back button one more time. The home screen could even have some buttons added to it, for example "Clear and Exit", and a forward button to resume browsing using the current session history. This would definitely be better than a modal confirmation popup.

Edit: I realized that the behavior is different depending on whether Focus was opened manually by the user or automatically from another app:

  • If opened manually, then the back button returns to the start screen after backing out of the session history, before exiting from Focus. This is what I has in mind when I originally wrote this comments.
  • If opened automatically from another app such as google search, then the back button exits from Focus immediately after backing out of the session history, i.e. the start screen is not displayed.

This difference is logical, I just wasn't aware of it earlier.

If Focus was opened manually, then I think the "simple solution" that I proposed above could work.

If Focus was opened automatically, then I think the existing operation is fine. The user may back out of Focus unintentionally, but that should return them to the previous app where the user clicked on a link. If desired, they can just click the link again to "go forward" back into Focus.

dillburt avatar Sep 08 '17 16:09 dillburt

@pocmo On my Honor phone, i have the overview button on the right side (down the floating erase button).

screenshot_2017-09-08-17-50-47

While using focus, i would jump to another app (like reading my whatsapp messages) and get back quickly with the overview button. But sometimes i accidentally hit the floating erase button instead.

layely avatar Sep 08 '17 18:09 layely

@layely Your comment above may be more relevant to issue #809 than this issue.

dillburt avatar Sep 08 '17 18:09 dillburt

FWIW, I like it the way it is

phunkular avatar Sep 18 '17 09:09 phunkular

Would this be fixed by the undo option in the "browser history erased" snackbar, as described in #467?

Benestar avatar Nov 03 '17 14:11 Benestar

Yes, I think this could be addressed by an undo option as discussed in #467.

The user may accidentally clear history by pressing the back button too many times, or by hitting the FAB which clears history. In either case, I think the possible solutions are the same. Either do something to help the users avoid accidental clearing, or provide an undo option to allow them to "get back where they were" if they did clear accidentally.

dillburt avatar Nov 06 '17 17:11 dillburt

closing in favour of #467

bbinto avatar Apr 19 '18 13:04 bbinto