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

Start named servers by pressing the Enter key #2960

Merged
merged 2 commits into from Mar 2, 2020

Conversation

jtpio
Copy link
Contributor

@jtpio jtpio commented Feb 28, 2020

Add support for the Enter key as an alternative to the "Add New Server" button to start new named servers.

named-servers-enter

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

Looks like a nice addition to me. Forms that can't be submitted by pressing return are a pet peeve :)

I am not current enough on web development best practices so this is mostly for my education: is there no way to tell a form that we want it to be submitted when the user presses return (without the need for extra JS and so on)? Or are we not actually submitting a HTML form in this case (hence setting window.location.href explicitly) so even if a browser could submit a form when we press enter it wouldn't work in this case because this isn't a form :)

@jtpio
Copy link
Contributor Author

jtpio commented Mar 2, 2020

Yes that would be the case with a form tag, but indeed there is no form submitted in this case.

@betatim betatim merged commit 1bdc66c into jupyterhub:master Mar 2, 2020
@jtpio jtpio deleted the named-servers-enter branch March 2, 2020 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants