Skip to content

Commit

Permalink
Select a whole default text in the input element when the window has …
Browse files Browse the repository at this point in the history
…been opened (#24)
  • Loading branch information
thewizardplusplus authored and p-sam committed Aug 30, 2018
1 parent e02b598 commit 6d8410b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/page/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,7 @@ docReady(() => {
dataEl.setAttribute('id', 'data');

dataEl.focus();
if (promptOptions.type === 'input') {
dataEl.select();
}
});

0 comments on commit 6d8410b

Please sign in to comment.