correct the search box to handle mouse selection