-
Notifications
You must be signed in to change notification settings - Fork 285
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 prompt to warn before quitting the application #173
Conversation
Should this apply to all quits, e.g explicit ones via mouse click on context menu or just Cmd + Q ones? Chrome on Macos does not warn when using context menu |
Also https://www.electronjs.org/docs/api/browser-window#event-close suggests that that it'll fire when the window is closed, so when minimizing to Dock. This sounds like clicking the red traffic light on the window will yield the prompt asking if you are sure you want to quit but clicking Yes will not actually Quit |
I have tested the different scenario, and I can confirm that items below all trigger the modal to be displayed
But after you mentioned this, I had a closer look, and I do believe that clicking on the red traffic light on Mac should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this side lgtm
this triggering this warning doesn't feel right given it does not match behaviour in the app we are basing the behaviour off of and is generally an explicit enough interaction that it shouldn't need confirmation. |
I have seen different programs treating this differently, from the behaviour I implemented to the one you're describing. Will clarify that with the design team and move this forward with the most appropriate experience for Element |
c70e17e
to
d986555
Compare
Fixes element-hq/element-web#16620
Related pull requests
The final copy is:
We originally wanted to implement a different UI, however due to the nature of JavaScript and how the
keyup
event is triggered, we had to choose this approach. View the original ticket if you are interested in the full contextI also wanted to add a checkbox letting the user opt-out from that warning dialog. This has proven quite difficult as we do have to use
dialog.showMessageBoxSync
and that this option seems to be only available withdialog.showMessageBox
despite what the documentation says (I opened a ticket electron/electron#28394)Lastly, there are no references to i18n in the
element-desktop
repo, and the menu items do not get translated either. To not drastically increase the scope of this ticket I intentionally left that out