Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
p-sam committed Aug 30, 2018
2 parents 5c99043 + 6d8410b commit dd1f1a1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ function electronPrompt(options, parentWindow) {
width: opts.width,
height: opts.height,
resizable: opts.resizable,
parent: parentWindow instanceof BrowserWindow ? parentWindow : null,
parent: parentWindow,
skipTaskbar: true,
alwaysOnTop: opts.alwaysOnTop,
useContentSize: true,
modal: Boolean(parentWindow instanceof BrowserWindow),
modal: Boolean(parentWindow),
title: opts.title,
icon: opts.icon
});
Expand Down
6 changes: 6 additions & 0 deletions lib/page/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ docReady(() => {
if (e.which === 13) {
promptSubmit();
}
if (e.which === 27) {
promptCancel();
}
});
} else if (promptOptions.type === 'select') {
dataEl = document.createElement('select');
Expand All @@ -102,4 +105,7 @@ docReady(() => {
dataEl.setAttribute('id', 'data');

dataEl.focus();
if (promptOptions.type === 'input') {
dataEl.select();
}
});
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-prompt",
"version": "1.1.0-1",
"version": "1.2.0",
"description": "Electron helper to prompt for a value via input or select",
"keywords": [
"electron",
Expand All @@ -13,7 +13,7 @@
"url": "https://github.com/p-sam"
},
"repository": {
"type": "git",
"type": "git",
"url": "https://github.com/p-sam/electron-prompt.git"
},
"license": "MIT",
Expand Down

0 comments on commit dd1f1a1

Please sign in to comment.