fix bug which causes sidebar to disappear when clicking the search box on mobile