Skip to content
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

fix: set default_id and cancel_id correctly on confirm dialogs #17547

Merged
merged 1 commit into from Mar 27, 2019

Conversation

MarshallOfSound
Copy link
Member

Description of Change

Sets cancel_id to the Cancel button and default_id to the OK button in CONFIRM type dialogs. (window.confirm)

Fixes #17502

Release Notes

Notes: Fixed the handling of the escape key in dialogs created by window.confirm. The "Cancel" button is now triggered by the escape key, and the "OK" button is now triggered by the return key.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 26, 2019
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 27, 2019
Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarshallOfSound MarshallOfSound merged commit 2188a6e into master Mar 27, 2019
@release-clerk
Copy link

release-clerk bot commented Mar 27, 2019

Release Notes Persisted

Fixed the handling of the escape key in dialogs created by window.confirm. The "Cancel" button is now triggered by the escape key, and the "OK" button is now triggered by the return key.

@trop
Copy link
Contributor

trop bot commented Mar 27, 2019

I have automatically backported this PR to "5-0-x", please check out #17578

@jsteiner
Copy link

@MarshallOfSound would it be possible to backport this to 4.x? Seems worth it given the potential consequences of wrongly confirming something.

@MarshallOfSound
Copy link
Member Author

@jsteiner I don't think 4.x has this bug and can't verify rn. Can you repro for 4?

@jsteiner
Copy link

@MarshallOfSound yeah, we're seeing this issue on 4.0.1. It does seem to have the same hardcoded line of code on the 4-1-x branch here: https://github.com/electron/electron/blob/4-1-x/atom/browser/atom_javascript_dialog_manager.cc#L79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants