0

When the screen width reaches less then 768x the search bar becomes a pop menu i.e. you click the magnifying class and it pops out. How would I disable this from happening?

0

You could look at using css to hide the magnifying glass from mobile up to 768px e.g

.magniying-glass {
    display:none;
    @media (max-width: 768px) {
       display:block; // Might be inline-block;
    }
}

something like this. without seeing you exact theme its hard to get the right result but that is one option. The other is you could rewrite the click event for the button so that when its clicked it does the action you want.

| improve this answer | |
0

Are you using blank for your parent theme? If so, I was able to pull down

/vendor/magento/theme-frontend-blank/Magento_CatalogSearch/web/css/source/_module.less

into my theme

/app/design/frontend/Your_theme_vendor/theme_name/Magento_CatalogSearch/web/css/source/_module.less

Once I had this pulled down I was able to remove items that were messing with my search.

FYI, before I figured this out I had tried to override the JS in

/vendor/magento/module-search/view/frontend/web/js/form-mini.js

and even tried to modify

/vendor/magento/module-search/view/frontend/templates/form.mini.phtml

But nothing worked. If anyone has a better solution please let me know!

Thank you,

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.