prevent double-submitting and enable enter key