Warehouse Search box
Sometimes, you may want the search box of the Warehouse theme not to appear by default and only open when clicking the Search icon. The function below will help overwrite the open:Search_Warehouse
function and fix this issue.
naviman.openSearch_Warehouse = function () { var search = document.querySelector('.header__search-bar-wrapper'); if (search) { if (window.getComputedStyle(search).visibility === 'hidden') { naviman.clickToElement('[data-action="toggle-search"]'); } window.scrollTo({ top: 0, behavior: "smooth" }); setTimeout(() = { naviman.focusToElement('.search-bar__input'); }, 300); } }