Bug 170604 - Warn Before Quit
Summary: Warn Before Quit
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Macintosh macOS 10.12
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-07 10:38 PDT by Chris Chiera
Modified: 2017-04-08 00:12 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Chiera 2017-04-07 10:38:57 PDT
Chrome has a great feature aptly named, "Warn Before Quit". It's enabled by choosing the word "Chrome" in the Mac Menu and then select "Warn Before Quit" in that dropdown.

It's been a life saver. As I use the great native app switcher shortcut "CMD+Tab" countless times every minute of every day to switch between apps. Unfortunately Tab is directly next to Q. So if one clicks CMD+Q it quits and app vs CMD+Tab which switches an app. In most apps this isn't too much of a big deal, since most Mac apps where you are entering content for instance will ask if you want to save the document before quitting. However of course saving a browser wouldn't make sense.

If you only have one tab open and are just surfing, you can simply reopen the browser, no big deal. However most of us have countless tabs open at once, meaning that mistaken CMD+Q vs CMD+Tab will make you lose all your tabs as well as potentially tabs you've entered content to which is now lost.

Warning when closing certainly shouldn't be default, but having an option like Chrome to warn would be wonderful. To note with Chrome if you enable that setting and press cmd+q mistakenly it will immediately popup saying hold CMD+Q to Quit. Meaning if it was a mistake you have a second to let go without losing any of your tabs, or if you hold it down within a second it will close all tabs like normal. 

Also I know you can customize shortcuts for apps in System Preferences but don't believe that allows you to have cmd+q work normally after an extended hold like above, as certainly wouldn't want to have a custom keyboard shortcut for quitting Safari in particular.
Comment 1 Alexey Proskuryakov 2017-04-08 00:12:15 PDT
Thank you for the suggestion!

This would be a Safari feature, not part of the WebKit rendering engine. Please send Safari bugs and enhancements requests via <https://bugreport.apple.com>.

That said, there are two existing features that help with this scenario:

1. In macOS General preferences, you can choose to have windows preserved across application relaunches.

2. Even if that's disabled, Safari has a menu item in History menu to re-open all windows from the previous session.