Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Focus the search field when it's opened #1316
The problem with autofocus is that there can be only one element with that attribute on the page (we have multiple tables/searches on some pages), and it would also grab the focus when the page is loaded for the first time (after closing the search, the open-search button needs to be focused, but the open-search button is visible already on page load).
I can investigate using refs. It might be possible to use the refs as a kind of a callback for finding out when the element becomes visible, which would avoid the polling.