Is it possible to remove Autofocus from an instant search input on Magento

How do I stop the instant search input from being autofocused in magento, the documentation isn’t very clear.

I have edited the configuration.phtml file and added ‘autofocus’ => false, and it is not working, I tried a ‘algoliaHookBeforeInstantsearchInit(instantsearchOptions) { hook’ with ‘algoliaConfig.instant.autofocus = false;’

and nothing. Could you please tell me exactly how to remove autofocus with hook, this is affecting our scroll position when clicking back and if there are no solutions we couldnt possibly continue to use algolia

I should mention the way our website is styled the search input is visable on load, you don’t need to click the search button first, the input is already shown

Hello @design,

autofocus is a parameter of searchBox widget:

Can you use beforeWidgetInitialization hook to pass the correct value of autofocus there?

It does not work unless the search bar is hidden behind a button. We are using magento 1 - thus referring to thiss article:

Your article is for Magento 2, doesn’t work. ‘algolia is undefined’…