fix input focus bug when switch view