cancel
Showing results for 
Search instead for 
Did you mean: 

Can't click in search bar

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Can't click in search bar

There seems to be a bug in my site where I can't click in the search bar unless I disable javascript. It seems to click in the immediatly click out again, but I am not an expert in JS so I am unsure how to solve the issue. Here is a link to the site, any help would be greatly appreciated!

https://theyarnstore.co.uk/newstore/

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Can't click in search bar

I've managed to solve it. The issue was that the search was moved to the nav bar in default.xml. I have changed it so that the nav is moved into the header and used a CSS grid to position elements instead.

 

<move element="navigation.sections" destination="header-wrapper" after="header.links" />
<move element="header.links" destination="header-wrapper" after="logo"/>

View solution in original post

5 REPLIES 5

Re: Can't click in search bar

Hello @neil_widdowson 

 

https://www.screencast.com/t/IRtboYPO

 

on line 56 : Uncaught SyntaxError: missing ) after argument list

 

https://theyarnstore.co.uk/newstore/pub/static/version1564050105/frontend/Magento/luma/en_GB/mage/me...

on line 6

 

disable min js and check it

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Can't click in search bar

Thanks for the reply. I've tried removing the file you mentioned menu.min.js and it still happened. This is a core file though, so I wouldn't expect it to have an error?

Do you have any other suggestions?

Re: Can't click in search bar

@neil_widdowson  This section should be outside of nav 

 

https://www.screencast.com/t/tiQHbGlwF

 

then it will work

 

 

If works then mark as a solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Can't click in search bar

Unfortunatly that didn't work, but I've noticed that removing the classes from the div containing search allows it to work, although I can't so this in production as I need to be able to style it! Maybe theres some JS being called that shouldn't be?

 

<div class="block block-search ui-menu-item" role="presentation">

Re: Can't click in search bar

I've managed to solve it. The issue was that the search was moved to the nav bar in default.xml. I have changed it so that the nav is moved into the header and used a CSS grid to position elements instead.

 

<move element="navigation.sections" destination="header-wrapper" after="header.links" />
<move element="header.links" destination="header-wrapper" after="logo"/>