Enter key on a prompt returns null value
See original GitHub issueWhen pressing the enter key on a prompt dialog, the dialog.data is null.
this.$dialog.prompt({ title: "My Title", body: "Some instructions on what to enter in the prompt." }) .then(dialog => { console.log(dialog); //when clicking the continue button, the dialog.data is what is expected. however, if the enter key is pressed, the dialog is closed, but dialog.data is null })
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Javascript prompt example returning null, 9/28 - Codecademy
null is the return value of prompt() when the Cancel button is clicked (or the Esc key pressed). I was able to reproduce...
Read more >Why prompt returns sometimes null as string - Stack Overflow
One line answer to your question is that, it returns null when user has escaped the prompt box by clicking cancel ...
Read more >Prompt for values until press ENTER key with empty value
I'm working in a bash script for automatize some tasks. This is what I have done until now:
Read more >JavaScript: The Definitive Guide, Fourth Edition [Book] - O'Reilly
If the user clicks the Cancel button, prompt( ) returns null . If the user clicks the Clear button, prompt( ) erases any...
Read more >Unable to get IF..ELSE condition to work using the prompt
When the user clicks the OK button, text entered in the input field is returned. If the user clicks OK without entering any...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can take a stab at this “bug”. Or is this already being fixed somewhere else? @Godofbrowser
Kindly checkout a new branch with descriptive name. Something like “fix/promt-enter-bug”. Thanks alot
On Sat, Jun 29, 2019, 12:09 PM Sergej Herbert <notifications@github.com wrote: