提交 e908219a 编写于 作者: A anafke 提交者: tfennelly

Remove unnecessary onblur call

Right now, checker is being attached to both onblur and onchange.  The result is when the user changes input, and that input loses focus, the checker is being fired twice.  This can cause issues on non-trivial field changes (such as validating a groovy script).  If there is no change, the checker is still called once due to the onblur.

The checker should only be called if the input is changed.
上级 a6766763
...@@ -456,7 +456,6 @@ function registerValidator(e) { ...@@ -456,7 +456,6 @@ function registerValidator(e) {
e.onchange = function() { checker.call(this); oldOnchange.call(this); } e.onchange = function() { checker.call(this); oldOnchange.call(this); }
} else } else
e.onchange = checker; e.onchange = checker;
e.onblur = checker;
var v = e.getAttribute("checkDependsOn"); var v = e.getAttribute("checkDependsOn");
if (v) { if (v) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册