Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend): allow clicking 'Enter' to send passwords #130

Merged
merged 4 commits into from
Jan 27, 2022

Conversation

rakeshdas1
Copy link
Contributor

Added a keypress handler to the initial password input field so that a user can simply press Enter to get into their dashboard instead of clicking on the "Login" button.

@MichaIng
Copy link
Collaborator

Awesome, I just through the same when hitting enter today and nothing happened 😄.

@MichaIng MichaIng added enhancement New feature or request javascript Pull requests that update Javascript code labels Jan 22, 2022
@ravenclaw900
Copy link
Owner

ravenclaw900 commented Jan 22, 2022

Hi,
Thank you for this, definitely something useful to have. However, instead of using an on:keypress handler, why not wrap the textbox and button in a <form>, which will do the same thing, and then you should be able to replace both the on:click and on:keypress with an on:submit.

@rakeshdas1
Copy link
Contributor Author

Great idea! I will implement that and remove the extraneous code.

src/frontend/src/App.svelte Outdated Show resolved Hide resolved
src/frontend/src/App.svelte Outdated Show resolved Hide resolved
Copy link
Owner

@ravenclaw900 ravenclaw900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@ravenclaw900 ravenclaw900 changed the title Password field enter key feat(frontend): allow clicking 'Enter' to send passwords Jan 27, 2022
@ravenclaw900 ravenclaw900 merged commit 0de4bbf into ravenclaw900:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants