Skip to content

Set focus on the search input if a query is set. #82648

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
wants to merge 1 commit into from
Closed

Set focus on the search input if a query is set. #82648

wants to merge 1 commit into from

Conversation

avborhanian
Copy link
Contributor

This addresses #78824 by manually focusing the element after it's enabled.

I tried autofocus as well, but I think that doesn't work because the element is marked disabled in the HTML on load. I added the input value conditional to make sure there's actually a search term set, otherwise we'd focus whenever any page was loaded.

@rust-highfive
Copy link
Contributor

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Contributor

r? @jyn514

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 1, 2021
@GuillaumeGomez
Copy link
Member

Hi, thanks for your PR! However, we already ruled this out (I opened a PR a while ago which did this and was rejected: #77333). I'll close it then (and the issue too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants