fix the bug that search button mis-positioned when narrowing window down