Cursor does not flee to end after typing character