Magento 2 Mobile Menu

When using autocomplete on a mobile device, there is no close button and no way to minimize the autocomplete menu unless you click on an item in the search results or erase what you entered. This occurs even on the Algolia demo version. How can I make it so you can click off of it on mobile and it auto closes?

I noticed on the Magento 1 demo that the magnifying glass switches to an X and you can clear it that way, how can I apply this same method to the Magento 2?

It’s possible, but that means it will also close when you press the “done” button on the keyboard. The option is called “debug”, which by default is on “true”, for your use case it would be on “false”.

However, looking at the source code, the option is enabled on mobile, even if you set isDebugEnabled to false In your dashboard.

The solution is to make the global function used for that return false.

window.isMobile = function() { return false }