-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "warning/confirmation" dialog when closing a window w/ multiple tabs #10430
Comments
Windows/Linux specific request as this is already available in macOS |
I think it would be a good feature, sometimes i have to many tabs opened in two or more windows and closing one of them by accident is not very chirfull because i lost the tabs. I know now there is an option to restore them from history, but previous 9 days ago i didn´t know about it and like me there are lots. And well other browsers have this feature like opera, ¿why not brave?, i mean, it´s simple and not intrusive. |
I totally agree, this simple confirmation or warn dialog aka beforeunload event (like in a web page) is critical for the browser window that has multiple open tabs. I do a TON of research and go between 3 brave windows, having 10 or more tabs open on each... accidentally closing one of the browser windows instead of a tab is a real PITA. I cannot just go back to the history because some of the pages hadn't been visited recently enough...and 'recently closed' won't restore because you closed the entire window. I also use extensions like Flowbar, but I want some tabs open to jump back to in a second, not try to find the right bookmark and load the page, and my reference info. Saving everything to PDF isn't always feasible either. |
+1 |
1 similar comment
+1 |
Today I lost all of my working tabs just for not being this feature. As the progress was not saved, I lost all the hard work and time. Developers @mrobinson @marshall @bridiver @mattmcalister @pes10k should add this feature in a short time. Maybe it's a minor change for them but it's a major for me. Thanks. |
@9codes it might be a bit late, but you can use a shortcut Ctrl + Shift + T (on macOS: Cmd + Shift + T) to restore your last closed tab / window. You can use this multiple times and you should be able to restore it. This works in Chromium and other browsers too |
@bsclifton Thanks for your response Brian. I will wait (for the feature). |
@brave Is there any chance we will get this simple feature anytime soon? |
I believe this is already here (inherited from upstream / Chromium). Does this do what you're asking for? It isn't specific to the "more than one tab" case, but it seems to solve the "whoops i didn't mean close and loose my stuff" problem. If that doesn't capture whats needed, can you kindly share a bit more about whats further needed? Thanks! |
Dear @pes10k, |
I believe this option is only available for macOS (as described by @srirambv ). Linux / Windows users DO NOT have this option. |
@murad-alm if you can write this feature in one line of code I would be happy to review the PR
|
I apologize if my bad joke offended you. Have a nice day @bridiver ! |
@murad-alm we get some very interesting responses sometimes so it's not always easy to pick out the jokes ;) |
+1 This is a much-needed feature for me. |
+1 please implement this feature |
This is for Windows. What about Linux ??? |
@DutchPete The fix for this issue (brave/brave-core#13003) is for all platforms. |
Verification
Filed ##23090
Case 2: Basic Test- Show `Close all tabs` warning dialog upon closing multiple tabs, when the pref is `enabled` - PASSED
Case 3: Do not show `Close all tabs` warning dialog when the pref is `disabled` again OR `Don’t ask me again` check box is checked - PASSED
Case 4: Test with `onbeforeunload` handler -PASSED
Case 5: Test with download in-progress handler -PASSEDFresh Install
Case 6: Test with onbeforeunload and download in-progress handler - PASSED(Note: On macOS, download warning dialog is not shown on normal profile. Private window will have same behavior on macOS with other platform's normal window)Fresh Install
Case 7:Test with reboot/restart - PASSEDbrave://restart and check window closing dialog is not launchedbrave://quit and check window closing dialog is not launchedClose all warning dialog is not launched for both restart and quit
Case 8: Test with update - PASSED
Case 9: Test with profile deletion -PASSED
Case 10: Windows/Linux specific test - PASSED
Additional scenarios
Test Case II Upgrade: Upgrade Test - PASSEDWarn me before closing window with multiple tabs prefWarn me before closing window with multiple tabs pref is available and set to OFF as a default
|
@MadhaviSeelam how about for Linux? Simon Hong mentioned on 16 May it would be done for Brave 1.40. |
@DutchPete Linux will be tested as well in 1.40.x |
Verification
|
Brave | 1.40.82 Chromium: 102.0.5005.78 (Official Build) beta (x86_64) |
---|---|
Revision | df6dbb5a9fd82af3f567198af2eb5fb4876ef99c-refs/branch-heads/5005_59@{#3} |
OS | macOS Version 11.6.6 (Build 20G624) |
Case 1: `Warn me before closing window with multiple tab` preference is added in brave://settings/HelpTips and is `disabled` as a default - PASSED
- Install 1.40.x
- Launch brave
- Open brave://settings>>click Additional settings>>click Help tips
- Verified `Warn me before closing window with multiple tab’ pref is available
- The toggle is
OFF
by default
dark | light |
---|---|
Case 2: Basic Test- Show `Close all tabs` warning dialog upon closing multiple tabs, when the pref is `enabled` - PASSED
- New profile
- Launch brave
- Create new window with multiple tabs
- Leave the default selection for
Continue where you left off
inbrave://settings/getStarted
- Close the browser window ('x' or alt+f4)
- Verified warning
Close all tabs
dialog is not launched since pref isOFF
by default - Enable
Warn me before closing window with multiple tabs
in Help tips section ofbrave://settings
- Close the browser window ('x' or alt+f4)
- Verified
Close all tabs
dialog displayed with correct text - UI matched to figma
- Click
Cancel
button - Warning dialog is dismissed
- Close the browser window again ('x' or alt+f4)
- Click
Close all
button in the Warning dialog - Relaunch the browser
- All of the tabs are preserved
Step 3&4 | Step 7 | Step 9 | Step 16 |
---|---|---|---|
Case 3: Do not show `Close all tabs` warning dialog when the pref is `disabled` again OR `Don’t ask me again` check box is checked - PASSED
- Continue from Case 2 (Pref is enabled)
- Open multiple tabs
- Leave the default selection for
Continue where you left off in brave://settings/getStarted
- Disable
Warn me before closing window with multiple tabs
pref inHelp tips
section ofbrave://settings
- Close the browser window
- Verified
Close all tabs
dialog not displayed - Relaunch the browser
- All of the tabs are preserved
- Enable the pref in the
Help tips
section ofbrave://settings
- Close the browser window
- Check the check box for
Don’t ask me again
- Click
Close all
button - Relaunch the browser
- All tabs are preserved
- Navigate to
Help tips
section ofbrave://settings
- Verified
Warn me before closing window with multiple tabs
pref is disabled
Step2&3 | Step4 | Step11 | Step14 |
---|---|---|---|
Case 4: Test with `onbeforeunload` handler - PASSED
- Launch Browser and set option is
enabled
- Create window and create more than one NTP tabs
- Load
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload
in one NTP and clickClick here to go to w3schools.com
and checkbeforeunload
dialog is launched. Then, dismiss it. - Try to close window by clicking close button or window closing shortcut (alt + f4, or cmd+shift+w on macOS)
- Select
Close all
and checkbeforeunload
dialog is launched - Cancel
beforeunload
dialog - Repeat step 4 and check window
Close all tabs
is shown again - Select Close all and also Leave from
beforeunload
dialog and check window is closed
Step 1 | Step2 | Step3 | Step4 | Step5 | Step7 | Step8 |
---|---|---|---|---|---|---|
Case 5: Test with download in-progress handler - PASSED
Fresh Install
- Launch Browser and set option is enabled
- Create window and create more than one NTP tabs
- Load
https://ubuntu.com/download/desktop/thank-you?version=22.04&architecture=amd64
and start download - Try to close window by clicking close button or window closing shortcut (alt + f4, or cmd+shift+w on macOS)
- Select
Close all
from window-closing dialog and checkDownload in-progress warning
dialog is launched - Select
Continue downloading
- Repeat step 4 and check window-closing dialog is launched again
- Select Close all from window-closing dialog and select
Exit
fromDownload in-progress
warning dialog - Check window is closed.
Ex1 | Ex2 | Ex3 |
---|---|---|
Case 6: Test with onbeforeunload and download in-progress handler - PASSED
(Note: On macOS, download warning dialog is not shown on normal profile. Private window will have same behavior on macOS with other platform's normal window)
Fresh Install
- Launch Browser and set option as
enabled
- Create window and create more than one NTP tabs
- Load
https://ubuntu.com/download/desktop/thank-you?version=22.04&architecture=amd64
and start download - Load
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload
in one NTP and clickClick here to go to w3schools.com
and checkbeforeunload
dialog is launched. Then, dismiss it. - Try to close window by clicking close button or window closing shortcut (alt + f4, or cmd+shift+w on macOS)
- Check download warning or
beforeunload
dialog is launched one by one after selecting Close all from window closing dialog - Verified
beforeunload
dialog is launched after selectingClose All
dialog
Ex1 | Ex2 | Ex3 | Ex4 | Ex5 |
---|---|---|---|---|
Case 7: Test with reboot/restart - PASSED
enabled
brave://restart
and check-window closing dialog is not launchedbrave://quit
and check window-closing dialog is not launchedClose all
warning dialog is not launched for both restart
and quit
Ex1 | Ex2 | Ex3 |
---|---|---|
Case 8: Test with update - PASSED
- Launch Browser and set option as
enabled
- Create window and more than one tab
- Load
brave://settings/help
and wait until relaunch is ready after downloading new update - Click
Relaunch
button and check window-closing dialog is not launched - Verified
Close all
warning dialog is not launched upon update
Step1 | Step3 | Update |
---|---|---|
Case 9: Test with profile deletion - PASSED
- Launch Browser and set option as
enabled
- Create window with more than one tabs
- Delete active profile and check window closing confirm dialog is not launched.
- Verified
Close all
warning dialog is not launched
Ex1 | Ex2 | Ex3 | Ex4 |
---|---|---|---|
Additional scenarios
- Verified the
Close all tabs
warning dialog works as expected withOpen the New Tab Page
selection in brave://settings/getStarted - Verified the
Close all tabs
warning dialog works as expected withOpen a specific page or set of pages
selection inbrave://settings/getStarted
- Verified
Close all tabs
warning dialog works as expected withPrivate Browsing with Tor
window - Verified
Close all tabs
warning dialog works as expected withPrivate
window
Test Case II Upgrade:
Upgrade Test - PASSED
Warn me before closing window with multiple tabs
prefWarn me before closing window with multiple tabs
pref is available and set to OFF
as a default1.40.80
Ex1 | Ex2 | Ex3 | Ex4 | Ex5 |
---|---|---|---|---|
Verification passed on
Brave | 1.40.87 Chromium: 102.0.5005.78 (Official Build) beta (64-bit) |
---|---|
Revision | df6dbb5a9fd82af3f567198af2eb5fb4876ef99c-refs/branch-heads/5005_59@{#3} |
OS | Ubuntu 18.04 LTS |
Case 1: `Warn me before closing window with multiple tab` preference is added in brave://settings/braveHelpTips and is `disabled` as a default - PASSED
- Install 1.40.x
- Launch brave
- Open brave://settings>>click Additional settings>>click Help tips
- Verified `Warn me before closing window with multiple tab’ pref is available
- The toggle is
OFF
by default
Case 2: Basic Test- Show `Close all tabs` warning dialog upon closing multiple tabs, when the pref is `enabled` - PASSED
- New profile
- Launch brave
- Create new window with multiple tabs
- Leave the default selection for
Continue where you left off
inbrave://settings/getStarted
- Close the browser window ('x' or alt+f4)
- Verified warning
Close all tabs
dialog is not launched since pref isOFF
by default - Enable
Warn me before closing window with multiple tabs
in Help tips section ofbrave://settings
- Close the browser window ('x' or alt+f4)
- Verified
Close all tabs
dialog displayed with correct text - UI matched to figma
- Click
Cancel
button - Warning dialog is dismissed
- Close the browser window again ('x' or alt+f4)
- Click
Close all
button in the Warning dialog - Relaunch the browser
- All of the tabs are preserved
Case 3: Do not show `Close all tabs` warning dialog when the pref is `disabled` again OR `Don’t ask me again` check box is checked - PASSED
- Continue from Case 2 (Pref is enabled)
- Open multiple tabs
- Leave the default selection for
Continue where you left off in brave://settings/getStarted
- Disable
Warn me before closing window with multiple tabs
pref inHelp tips
section ofbrave://settings
- Close the browser window
- Verified
Close all tabs
dialog not displayed - Relaunch the browser
- All of the tabs are preserved
- Enable the pref in the
Help tips
section ofbrave://settings
- Close the browser window
- Check the check box for
Don’t ask me again
- Click
Close all
button - Relaunch the browser
- All tabs are preserved
- Navigate to
Help tips
section ofbrave://settings
- Verified
Warn me before closing window with multiple tabs
pref is disabled
Case 4: Test with `onbeforeunload` handler - PASSED
- Launch Browser and set option is
enabled
- Create window and create more than one NTP tabs
- Load
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload
in one NTP and clickClick here to go to w3schools.com
and checkbeforeunload
dialog is launched. Then, dismiss it. - Try to close window by clicking close button or window closing shortcut (alt + f4, or cmd+shift+w on macOS)
- Select
Close all
and checkbeforeunload
dialog is launched - Cancel
beforeunload
dialog - Repeat step 4 and check window
Close all tabs
is shown again - Select Close all and also Leave from
beforeunload
dialog and check window is closed
Case 5: Test with download in-progress handler - PASSED
Fresh Install
- Launch Browser and set option is enabled
- Create window and create more than one NTP tabs
- Load
https://ubuntu.com/download/desktop/thank-you?version=22.04&architecture=amd64
and start download - Try to close window by clicking close button or window closing shortcut (alt + f4, or cmd+shift+w on macOS)
- Select
Close all
from window-closing dialog and checkDownload in-progress warning
dialog is launched - Select
Continue downloading
- Repeat step 4 and check window-closing dialog is launched again
- Select Close all from window-closing dialog and select
Exit
fromDownload in-progress
warning dialog - Check window is closed.
Case 6: Test with onbeforeunload and download in-progress handler - PASSED
(Note: On macOS, download warning dialog is not shown on normal profile. Private window will have same behavior on macOS with other platform's normal window)
Fresh Install
- Launch Browser and set option as
enabled
- Create window and create more than one NTP tabs
- Load
https://ubuntu.com/download/desktop/thank-you?version=22.04&architecture=amd64
and start download - Load
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload
in one NTP and clickClick here to go to w3schools.com
and checkbeforeunload
dialog is launched. Then, dismiss it. - Try to close window by clicking close button or window closing shortcut (alt + f4, or cmd+shift+w on macOS)
- Check download warning or
beforeunload
dialog is launched one by one after selecting Close all from window closing dialog - Verified
beforeunload
dialog is launched after selectingClose All
dialog
Case 7: Test with reboot/restart - PASSED
enabled
brave://restart
and check-window closing dialog is not launchedbrave://quit
and check window-closing dialog is not launchedClose all
warning dialog is not launched for both restart
and quit
Case 8: Test with update - PASSED
- Launch Browser and set option as
enabled
- Create window and more than one tab
- Load
brave://settings/help
and wait until relaunch is ready after downloading new update - Click
Relaunch
button and check window-closing dialog is not launched - Verified
Close all
warning dialog is not launched upon update
Case 9: Test with profile deletion - PASSED
- Launch Browser and set option as
enabled
- Create window with more than one tabs
- Delete active profile and check window closing confirm dialog is not launched.
- Verified
Close all
warning dialog is not launched
Additional scenarios
- Verified the
Close all tabs
warning dialog works as expected withOpen the New Tab Page
selection in brave://settings/getStarted - Verified the
Close all tabs
warning dialog works as expected withOpen a specific page or set of pages
selection inbrave://settings/getStarted
- Verified
Close all tabs
warning dialog works as expected withPrivate Browsing with Tor
window - Verified
Close all tabs
warning dialog works as expected withPrivate
window
Test Case II Upgrade:
Upgrade Test - PASSED
Warn me before closing window with multiple tabs
prefWarn me before closing window with multiple tabs
pref is available and set to OFF
as a default1.40.80
Description
Several users have requested the option to confirm whether or not they want to close a window when multiple tabs are open in it. This functionality would be similar to what is already implemented in other browsers like Firefox and IE:
This functionality would prevent users from inadvertently closing a browser window. Also note that this functionality exists when attempting to Quit the application process and even has an option to opt out of the
Press to hold
function:Designs
Add the preference to warn when closing multiple tabs to the
Help tips
section inbrave://settings
. This is off by default.Move
Show warning before quitting with ⌘Q
out of the Appearance section and to the Help Tips section too.When toggled on, show a warning dialog when the user when closing multiple tabs.
Assets
Figma: https://www.figma.com/file/pVwKlNQJU9wTVOa9tImKpo/?node-id=318%3A9788
Miscellaneous Information:
Several users responding to this feature request -- will add additional request threads as I find them:
https://community.brave.com/t/five-years-and-no-progress-warn-before-closing-multiple-tabs/86525/7
The text was updated successfully, but these errors were encountered: