Merge pull request #15341 from Snuffleupagus/PasswordPrompt-cancel-button

Improve handling of the "Cancel"-button in the password dialog
This commit is contained in:
Tim van der Meij 2022-08-27 13:10:39 +02:00 committed by GitHub
commit 4469453425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ class PasswordPrompt {
// Attach the event listeners.
this.submitButton.addEventListener("click", this.#verify.bind(this));
this.cancelButton.addEventListener("click", this.#cancel.bind(this));
this.cancelButton.addEventListener("click", this.close.bind(this));
this.input.addEventListener("keydown", e => {
if (e.keyCode === /* Enter = */ 13) {
this.#verify();