email-autocomplete
email-autocomplete copied to clipboard
Add support for arrow keys and more
This pull request slightly changes the UI behavior and the API, but I still wanted to share it:
- Show suggestion as soon as any character is entered, not waiting for an "@" sign and the first character of the domain
- Use up and down arrows (cursor keys) to browse through all matches
- Don't autocomplete on focus leave, only on tab, right arrow, click
- Only handle right arrow as autocomplete at end of input. This enables users to edit the text left of the "@" character without accidentally triggering autocomplete
- Allow user to replace the list of domains, not just extend it (API change)
- Make the separator character configurable; default is of course
@
@fjl5 Thanks for your input, I'll have a look :)