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

cheat-sheet: Add autofocus on load to search input text #1557

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

guillaumeboehm
Copy link
Contributor

Description

Autofocusing the cheat sheet input text on page load would improve some workflows and I doubt would break other workflows.

I'm not 100% sure I understood the framework, but hopefully this works.

Requirements / Checklist

What does this Pull Request (PR) do?

Adds the autofocus attribute to the search input field.

How should this be manually tested?

See if the search input field is focused automatically on page load

@Finii
Copy link
Collaborator

Finii commented Mar 25, 2024

Thanks for the PR.

Usually I hate focus stealing stuff, but here it is ok and helpful I guess.
Also considered concerns as stated here: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus

I played around with it a bit and could not find and false trigger or problem.

Great! Thanks again :-)

@Finii Finii merged commit e8a7215 into ryanoasis:master Mar 25, 2024
1 check passed
@Finii
Copy link
Collaborator

Finii commented Mar 25, 2024

@allcontributors please add @guillaumeboehm for code

Copy link
Contributor

@Finii

I've put up a pull request to add @guillaumeboehm! 🎉

Finii added a commit that referenced this pull request Mar 25, 2024
Manually apply #1557

Usually the Cheat Sheet is only updated / generated on release.

Signed-off-by: Fini Jastrow <[email protected]>
@guillaumeboehm
Copy link
Contributor Author

Thanks for the PR.

Usually I hate focus stealing stuff, but here it is ok and helpful I guess. Also considered concerns as stated here: developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus

I played around with it a bit and could not find and false trigger or problem.

Great! Thanks again :-)

Oh yeah thanks for the link, good little read. I gotta say I didn't think about accessibility ^^ Anyway thanks for the approval !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants