fix focus got lost problem