fix input cusor middle bug