From 3e46323fb8c43b5a226251299a993befc896b71f Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 12 Sep 2017 12:16:21 -0400 Subject: [PATCH] RT# 77504 - Documented javascript. --- httemplate/elements/validate_password.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httemplate/elements/validate_password.html b/httemplate/elements/validate_password.html index d7e9f6d81..4057f5d3f 100644 --- a/httemplate/elements/validate_password.html +++ b/httemplate/elements/validate_password.html @@ -25,7 +25,9 @@ function add_password_validation (fieldid, submitid) { inputfield.onkeydown = function(e) { var key; if (window.event) { key = window.event.keyCode; } - else { key = e.which; } + else { key = e.which; } // for ff browsers + // some browsers allow the enter key to submit a form even if the submit button is disabled + // below prevents enter key from submiting form if password has not been validated. if (key == '13') { var check = checkPasswordValidation(); return check; -- 2.11.0