question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enter key on a prompt returns null value

See original GitHub issue

When 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:open
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fr-sercommented, Jun 29, 2019

I can take a stab at this “bug”. Or is this already being fixed somewhere else? @Godofbrowser

0reactions
Godofbrowsercommented, Jun 29, 2019

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:

@godofbrowsers should I do it in the master branch or the branch “Feature/prompt”?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Godofbrowser/vuejs-dialog/issues/52?email_source=notifications&email_token=AE3FHD3HO2J37EMBDVWS6WLP447HXA5CNFSM4HGPIV3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3W3TA#issuecomment-506949068, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3FHD3LJ56TAA26SYK5BLTP447HXANCNFSM4HGPIV3A .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found