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

x/playground: Autofocus the text area on page load #49452

Open
NiloCK opened this issue Nov 8, 2021 · 1 comment
Open

x/playground: Autofocus the text area on page load #49452

NiloCK opened this issue Nov 8, 2021 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@NiloCK
Copy link

NiloCK commented Nov 8, 2021

play.golang.org should autofocus its text area on load, as is done by tour.golang.org. This simplifies the (probably common) use case of navigating to the page, writing a tiny program, and then checking that it compiles & produces expected output.

Currently, I hit tab 7 times on page-load to bring myself to the editor.

What version of Go are you using (go version)?

https://play.golang.org/

Does this issue reproduce with the latest release?

not applicable

What operating system and processor architecture are you using (go env)?

not applicable

What did you do?

navigated to https://play.golang.org/

What did you expect to see?

a blinking cursor

What did you see instead?

Buttons!

@NiloCK NiloCK changed the title Autofocus the text area in the playground x/playground: Autofocus the text area on page load Nov 8, 2021
NiloCK added a commit to NiloCK/playground that referenced this issue Nov 8, 2021
Based on my own use case, the playground is probably often used for very quick one-off checks of language rules.

Autofocus on the `textarea` lowers friction in this case. Otherwise I rely on correctly hitting tab 7 times.

fixes golang/go#49452
@gopherbot gopherbot added this to the Unreleased milestone Nov 8, 2021
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 8, 2021
@cagedmantis
Copy link
Contributor

cc @toothrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants