Skip to content

Commit

Permalink
v1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
p-sam committed Jan 25, 2020
2 parents f93b02d + ca0c3ad commit bc75664
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions lib/page/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,17 @@ docReady(() => {
}

dataEl.addEventListener('keyup', e => {
if (e.key === 'Enter') {
promptSubmit();
}

if (e.key === 'Escape') {
promptCancel();
}
});

dataEl.addEventListener('keypress', e => {
if (e.key === 'Enter') {
e.preventDefault();
promptSubmit();
}
});
} else if (promptOptions.type === 'select') {
dataEl = document.createElement('select');
let optionEl;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-prompt",
"version": "1.5.0",
"version": "1.5.1",
"description": "Electron helper to prompt for a value via input or select",
"keywords": [
"electron",
Expand Down

0 comments on commit bc75664

Please sign in to comment.