Skip to content

Hide the search crate text field by default #118

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

Closed
antoyo opened this issue Apr 22, 2017 · 13 comments · Fixed by #741 or #1194
Closed

Hide the search crate text field by default #118

antoyo opened this issue Apr 22, 2017 · 13 comments · Fixed by #741 or #1194

Comments

@antoyo
Copy link

antoyo commented Apr 22, 2017

Hi!

Some web plugins/web browsers have a shortcut to focus the first text field in a page, which is what I use in Rust documentations to start a search within the crate.
However, on docs.rs, there's another "Find crate" text field which is before the documentation search field which forbids me to use this shortcut.

So, it would be nice to hide the "Find crate" text field by default, requiring to click a button or hover to show the text field.
Another solution that would make it after the other text field would also fix this issue.

If you need help to implement that, I can contribute.

Thanks.

@onur
Copy link
Member

onur commented Apr 22, 2017

I am not sure but I think adding tabindex="-1" should fix this issue. Can you tell me which browser or plugin acting like this, so I can test it?

@antoyo
Copy link
Author

antoyo commented Apr 22, 2017

Vimperator is a plugin for Firefox which allows to select the first field with the sortcut gi.
There are other plugins/browsers, but in my case, I develop my own, so adding the tabindex="-1" will be enough for me.
However, it does not seem to work with Vimperator (I don't really care, but other people might care :) ).

@onur
Copy link
Member

onur commented Apr 27, 2017

2gi is working fine for vimperator and vimium. TBH I am not sure about changing a basic text input with javascript.

@antoyo
Copy link
Author

antoyo commented Apr 27, 2017

What about just adding tabindex="-1"?
That does not require JavaScript.

@onur
Copy link
Member

onur commented Apr 27, 2017

Sure, I can do that when I am home.

@onur onur closed this as completed in a6207bc Apr 28, 2017
@antoyo
Copy link
Author

antoyo commented Apr 28, 2017

Thanks!

@antoyo
Copy link
Author

antoyo commented May 3, 2020

This has been somehow removed.
Can we add this back?

@jyn514 jyn514 reopened this May 3, 2020
@jyn514
Copy link
Member

jyn514 commented May 3, 2020

It seems this was removed in #611, cc @GuillaumeGomez . I think it should be as easy as adding back tabindex="-1"?

@GuillaumeGomez
Copy link
Member

Normally it should be just that, indeed. Want me to send the PR?

@jyn514
Copy link
Member

jyn514 commented May 3, 2020

That would be great :)

@GuillaumeGomez
Copy link
Member

Opened #741. :)

@antoyo
Copy link
Author

antoyo commented Nov 28, 2020

That was removed again.
cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

It's been removed in this commit.

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