Automattic / newspack-theme

A theme for Newspack.

Home Page:https://newspack.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

πŸŽ‰ This issue has been resolved in version 1.60.0-alpha.1 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

πŸŽ‰ This issue has been resolved in version 1.60.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€