Search: Focus is not always set in the search input when opened
laurelfulford opened this issue Β· comments
Describe the bug
When you open the search in the theme's header, focus should move to the input. However, this doesn't always work with the AMP version of the code.
The toggle was written in such a way to "expect" the ID search-form-2
(assuming it's the second form on the page's markup, after the one in the mobile menu); it looks like expecting that specific ID is not dependable, and it can be a higher number.
This needs to be updated to behave more dependably, without relying on the autogenerated ID that comes from wp_unique_id
, which can be used by more than the search.
The release is available on GitHub release
Your semantic-release bot
The release is available on GitHub release
Your semantic-release bot