Remove defaultId from remove dialog #176

Closed
kernelwhisperer wants to merge 1 commit from bugfix/escape-should-close-remove-dialog into master
kernelwhisperer commented 2018-08-16 10:38:56 -04:00 (Migrated from github.com)

What changed?

This is related to https://gitlab.com/siderus/orion/App/issues/17 and https://github.com/Siderus/Orion/issues/136#issuecomment-403224003

Before this change (with defaultId set to 1), pressing escape would close the dialog on windows and linux and return 0, but on macOS nothing would happen.

I've looked into implementing this, listening for the keypress, but there is no way to close the dialog programatically at the moment: https://github.com/electron/electron/issues/5577 .

What I noticed though is that some dialog do close when pressing escape on mac and that is because they don't have a defaultId.

If we remove the defaultId pressing escape would work on mac as well, but that means pressing enter no longer deletes the file, but cancels the operation instead.

Thoughts?

## What changed? This is related to https://gitlab.com/siderus/orion/App/issues/17 and https://github.com/Siderus/Orion/issues/136#issuecomment-403224003 Before this change (with defaultId set to 1), pressing escape would close the dialog on windows and linux and return 0, but on macOS nothing would happen. I've looked into implementing this, listening for the keypress, but there is no way to close the dialog programatically at the moment: https://github.com/electron/electron/issues/5577 . What I noticed though is that some dialog do close when pressing escape on mac and that is because they don't have a `defaultId`. If we remove the `defaultId` pressing escape would work on mac as well, but that means pressing enter no longer deletes the file, but cancels the operation instead. Thoughts?
koalalorenzo (Migrated from github.com) reviewed 2018-08-16 10:38:56 -04:00
koalalorenzo commented 2018-08-16 17:47:39 -04:00 (Migrated from github.com)

What are the defaults if we don't specify anything?
I would close this PR and don't change the behaviour as I guess the "ESC" button is a feature that, in the dialogs we are talking about, is handled by the OS level. I guess...

What do you say?

What are the defaults if we don't specify anything? I would close this PR and don't change the behaviour as I guess the "ESC" button is a feature that, in the dialogs we are talking about, is handled by the OS level. I guess... What do you say?
koalalorenzo commented 2018-08-17 02:33:52 -04:00 (Migrated from github.com)

As discussed @0x6431346e will open an issue on Electron side

As discussed @0x6431346e will open an issue on Electron side
kernelwhisperer commented 2018-08-17 03:21:12 -04:00 (Migrated from github.com)
Reported here: https://github.com/electron/electron/issues/14160

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Siderus/Orion!176
No description provided.