-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch the enter keypress event before submit
Fixes #54
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ca0c3ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keypress fixed the enter problem but broke escape. Keydown works for both.
ca0c3ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, as you can see, I now listen for the keypress event for Enter, and the keyup event for Escape. Did you try the fix? (What electron ver, os, etc)
ca0c3ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, didn't see it the first time. Tested prompt 1.5.1 on win10, Node.js 12.4.0, Chromium 76.0.3809.146, and Electron 6.1.7.
Everything works ok again.
ca0c3ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing, it's now in the v1.5.1 release, and published on npm