add search-popup logic