Search input autofocus not working

I have a search bar on my nav, which shows after the search icon is clicked.

The issue is: I have set the autofocus on the search input, but it doesn’t seem to work somehow. Please see screenshots of the same.

PS: I tried adding this code and Div IDs are the same. Still doesn’t work. :frowning:

(refer to screenshots)


Custom code


Try making the class names all lowercase (Webflow converts to lowercase on publish)

Hi Vigy,

Make sure your input exists/ is loaded before the script is executed, this could be why it is not focusing.