-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Switch out of private mode when app is removed from memory #4780
Comments
@sblatz Hi, with the introduction of PBM launcher I think we should modify the behaviour for when Firefox Preview is set in the background (swiped up off the screen). Right now, if the user was last in PBM with tabs opened and backgrounds the app, the private tabs are cleared but it is still set in PBM. The new behaviour would be when the app is in the background in PBM, upon opening the app again, it will default back to non-private browsing mode. Let me know if you have any questions |
Following up on this since I has been a while. Has any decisions been made on this issue? |
@rushsteve1 I will bring this up in our next triage meeting since we are adding the ability to launch in default private mode soon :) |
@sblatz does switching out of private mode mean that users will lose their private tabs? |
@vesta0 No, it'd be equivalent to pressing the mask icon to switch back to normal browsing :) |
@sblatz great, thanks for confirming 👍 |
To clarify: should we only show "normal mode" if the private mode tabs have been cleared (by the user force quitting the app or the system killing our process)? Or should it always show normal mode? |
In my patch at least, and in the main version of Firefox Android, it only switches back to Normal mode when the app is killed and the private mode tabs are destroyed. I personally think that this is better UX, since applications that haven't been quit are thought of as still being in-use. Also it would be very counter-intuitive to switch modes while retaining the private tabs. |
@rushsteve1 https://github.com/mozilla-mobile/fenix/pull/4773/files would get us most of the way there but we'd need to make sure to not switch to normal mode if the user launched with the private browsing shortcut or has "always open links in private mode" enabled. |
That should be a simple matter of replacing the setPrivateModeI(false) with (I don't know the actual variables but the idea should be obvious) setPrivateMode(privateBrowsingShortcut || alwaysOpenInPrivate) |
@sblatz Verified on latest Nightly 10/4 and found one issue: The default launcher (of normal browsing) keeps opening in PBM (where it was left) when the "Open links in private mode" setting is checked. |
Thanks @sv-ohorvath, I'll work on a fix. |
… status This didn't function when 'open links in a private tab' was set. Rather than adding another sketchy fix for the edge case, following commits will change `usePrivateMode` to be maintained in memory, instead of in Settings.
This didn't function when 'open links in a private tab' was set. Rather than adding another sketchy fix for the edge case, following commits will change `usePrivateMode` to be maintained in memory, instead of in Settings.
Verified as fixed on Nightly 10/9. |
Hi. I have opened a feature request #5883 to provide a way to open Fenix in normal mode in all cases, even if Fenix was previously used in PBM and has not been removed from the memory yet. |
Thank you for opening the feature request! We look at every new request, but we're a little backed up atm and it's taking us a while to get through to them. FWIW, I think there's currently a lot of discussion around private mode with different options being discussed. I'm not sure what we'll eventually land on, but the behavior in this PR won't necessarily be final. |
@baron-severin Thanks a lot for the clarification. Looking forward to what's next :) |
Hi. I was thinking of opening a new issue but I found this in milestones. The previous behavior was fine for me. I use desktop Firefox in private browsing mode permanently, and the Fenix toggle replicated that functionality on Android. With this feature gone, I have to open Fenix, switch to private browsing each time, and then continue. Can there be a toggle to use private browsing permanently, just like desktop Firefox? |
@opusforlife2: You can add a private shortcut to your home screen. You find the option to add the shortcut on the settings screen. |
@opusforlife2 if you go to “set as default browser” in Fenix’s settings and enable “open links in private mode” as well as adding the private mode shortcut to your home screen you will effectively have an “always private mode” browser like on desktop :) Let me know if this doesn’t cover your use case. |
@sblatz One minor nitpick with the current behavior: When you open Fenix using the private browsing shortcut, it takes you straight to the address bar in private browsing mode, but if you tap back, it switches to non private browsing. But in general, I would prefer the private browsing shortcut to open Fenix not to the address bar with the keyboard automatically popping up, but to the home screen, like it normally does with the default launcher icon. For complete feature parity with desktop Firefox, though, I would like a setting which makes it impossible to exit private browsing mode unless that setting is turned off. |
@opusforlife2 can you please file a separate issue for that and tag me on it? :) |
@sblatz Done! |
I'm still having this issue, can someone please confirm I'm not the only one? Thanks. |
@sv-ohorvath thanks, I'm not sure I understand the reasoning behind it though... Wouldn't it be more logical for the browser to switch back to normal mode if there's no private tabs open anymore? Or just use whatever was the last used mode, ignoring links/custom tabs? Having different shortcuts (default/private mode) makes no sense otherwise, since simply turning on the "Open links in private mode" option overrides the default/private shortcut behavior. Maybe I'm just misusing the "Open links in private mode" option? I thought its use was to not "pollute" the browser history with random links openend from different apps (WhatsApp, Reddit, etc), keeping them separated from normal browsing, but right now the option is not affecting only links... the current behaviour is more similar to "Always use private mode" than "Open links in private mode". Edit: Maybe I should add a more direct example. |
@DatGrey The browser then keeps as default the mode which was last used when is backgrounded or killed (swiped out of recent tasks) - this functions independent of "Open links in private mode" I hope this makes sense. |
@sv-ohorvath thanks for your patience, I've just realized (thanks to your explanation) that the issue I've been seeing happens only when opening links with Firefox in "Chrome Custom tabs" mode - everything works fine using Firefox normally, which I'm doing now. |
I'm opening this in response to #4773.
Currently it is expected behavior that we persist private mode when the app is paused. With the introduction of our "launch in private browsing" feature we should consider if we want to keep this behavior.
@AmyYLee commented on that PR:
Of note: our "normal" launcher will still launch in private mode if that's where the user left it, so I don't think it actually solves that case. We should just decide if we want this functionality.
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: