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

Main home page search input does not autofocus for me on page load #150

Closed
harold opened this issue Dec 15, 2016 · 4 comments
Closed

Main home page search input does not autofocus for me on page load #150

harold opened this issue Dec 15, 2016 · 4 comments

Comments

@harold
Copy link

harold commented Dec 15, 2016

Hello! Thanks for clojuredocs it's amazing and I use it all the time.

When I go to the homepage: https://clojuredocs.org/ the main search box is not automatically focused and I have to click it before I can search. I use the site so much that this is actually mildly painful.

I grep'd and noticed this:

:autoFocus "autofocus"

That capital F in the attribute name (:autoFocus instead of :autofocus) may be the reason. It's just a hunch, I have not tested.

Regardless, if the search box on the home page could autofocus, that would be great.

With appreciation for your time,
-Harold

@harold
Copy link
Author

harold commented Dec 15, 2016

Chrome Version 54.0.2840.71 (64-bit)

@zk zk closed this as completed in e541278 Dec 22, 2016
@zk
Copy link
Owner

zk commented Dec 22, 2016

Thanks @harold. The autofocus capitalization was a good guess, but unfortunately the statically generated input is being replaced on JS load, so the autofocus property wasn't the issue (additionally, React complains if 'autoFocus' isn't camel cased).

Had to manually focus the input on mount to fix the problem. Shipping now, should be up in a minute here.

@harold
Copy link
Author

harold commented Dec 22, 2016

Epic nice. Sorry for the red herring. It's working for me now. Good stuff! Thanks!

@zk
Copy link
Owner

zk commented Dec 22, 2016

No prob, thanks for the report 😄

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

No branches or pull requests

2 participants