element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

"Warn before quitting" should not be required by default

Open domoritz opened this issue 4 years ago • 12 comments

On MacOS, when running CMD+Q, I would expect Element to close but I need to first confirm that I want to close the app. I believe the preference "Warn before quitting" should be off by default just like any other app where you don't lose anything when you close the app.

In order to prevent people from losing state, Element needs to implement beforeunload (or an equivalent) for non-recoverable state.

domoritz avatar May 15 '21 15:05 domoritz

should be off by default just like any other app where you don't lose anything when you close the app.

Its not off by default in Chrome on MacOS

t3chguy avatar May 15 '21 15:05 t3chguy

Good point. However, in a browser people may actually lose something they care about (e.g. open tabs, something they typed into a form etc).

Element is an application and a reversible action should not require a confirmation prompt by default.

domoritz avatar May 15 '21 15:05 domoritz

Webpages have a beforeunload handler which can trigger a dialog for that situation, and that'll be shown regardless of Warn Before Quitting setting

Element is an application and a reversible action should not require a confirmation prompt by default.

Not everything you do in Element is lossless, e.g if you're mid-way through changing the topic of a room, when you restart the app you'll be back on the room timeline, settings closed, progress lost

something they typed into a form

exactly like this in fact

t3chguy avatar May 15 '21 15:05 t3chguy

Webpages have a beforeunload handler which can trigger a dialog for that situation, and that'll be shown regardless of Warn Before Quitting setting

Excellent idea. Element should implement that for cases when the user is in the middle of making a non-recoverable edit or has unsent messages. However, I strongly believe that the confirmation dialog should not be required 100% of the time.

domoritz avatar May 15 '21 15:05 domoritz

It'd be really difficult to identify and implement for each and every state which is not fully recoverable.

Element should implement that for cases when the user is in the middle of making a non-recoverable edit or has unsent messages.

Edits, unsent messages, drafts should all already be persisted. Other things like state of filters, other form elements, will not be.

t3chguy avatar May 15 '21 15:05 t3chguy

I see. I can reword the issue then as a feature request to work towards not requiring confirmation for quitting the app.

domoritz avatar May 15 '21 15:05 domoritz

I mean, this was a feature that was recently added by user request, it has a user preference for a reason, whether or not that's on/off by default seems very minimal and open to one's own opinion.

t3chguy avatar May 15 '21 15:05 t3chguy

Would be nice if the warn before quit dialog had a "close and don't warn me again" button so you don't have to look around to find the specific preference.

aaronraimist avatar May 16 '21 06:05 aaronraimist

The right solution is to only show a dialog when there is some state that would get lost and not even have a toggle in the settings.

domoritz avatar May 16 '21 06:05 domoritz

Would it at least be possible to add a setting so that users can decide if they want to see the confirmation dialog or not? I find this forced behavior very unfriendly, because the expected behavior on macOS is that an app quits on Cmd+Q. Yes, on Chrome the default is to show a confirmation dialog, but this can at least be disabled.

cbrnr avatar Nov 26 '25 08:11 cbrnr

@cbrnr it's like there's a setting for it...

Image

t3chguy avatar Nov 26 '25 10:11 t3chguy

Perfect, thank you!

cbrnr avatar Nov 26 '25 14:11 cbrnr