prevent page scroll on valid input