added listener to hide search input when not being used