Move from AutoComplete to InstantSearch on enter key

Hi!

I am using the Algolia AutoComplete on our webshop search. It is working nicely but I would like to send the customer to InstantSearch on enter key press.

For example if the customer has entered “shoes” AutoComplete will show a small section of shoes. If the customer would press enter key the page would reload with search “/search?q=[[ query ]]” and you would be at InstantSearch.

Is this something that is doable with javascript?

Our shop is: https://www.puhdistamo.fi/

Hey @krister.e

As you already have a button to take a user to the /search page with the current query, you’re half the way there. If you add an eventListener similar to this one you should have what you are looking for.

Thank you @the :clap:

Got it working and now the issue is fixed.
I appreciate your help!

1 Like