This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: electron/electron#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?