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.

Keyboard usage of autocomplete causes form submission

See original GitHub issue

Currently if an Autocomplete is used within a form, then when you use the Enter key to make your selection, it will also trigger the onClick event on the element with type="submit" within the form.

For the user, it makes sense to trigger form submission when the menu is closed, but not while the Autocomplete menu is open. Your typical select element is a good example of this.

What are your thoughts?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mlaursencommented, Dec 22, 2016

Ooh. That might be a problem with my AccessibleFakeButton which is used for the ListItem and SelectField. I might just need to prevent default behavior when I simulate the button enter or space interaction so it isn’t submitted as well.

0reactions
gotrecillocommented, Jan 25, 2018

Sorry for posting in a closed issue.

There is some info about this ?

Can we help with anything ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

When To Use Input Autocomplete In HTML (And When List Or ...
The autocomplete attribute asks the browser to attempt autocompletion, based on user history. This is useful for personal details like name and email...
Read more >
How do you disable browser autocomplete on web form field ...
The first thing to bring up is that auto-complete not being explicitly disabled on login form fields is a PCI-DSS fail. In addition,...
Read more >
For Auto complete control,whole form is submitting ...
For Auto complete control,whole form is submitting automatically when option is selected with enter key with keyboard navigation.(not a problem ...
Read more >
Sign-in form best practices - web.dev
Ensure successful form submission. Use autocomplete="new-password" and id="new-password" for the password input in a sign-up form, ...
Read more >
How to Create Autofill Forms (with Autocomplete) to Secure ...
Its main function is to suggest the next information after the respondent starts typing. It stores data in the browser and it's used...
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