commit 6830b5896a9031493bdd112622e1409077201304
parent c00149c4786f8a68eefb352f93a8b234a0fc5880
Author: Alexander Burger <abu@software-lab.de>
Date: Wed, 30 Nov 2011 10:01:46 +0100
More on "onblur"
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/form.js b/lib/form.js
@@ -305,6 +305,9 @@ function doHint(field) {
Hint.appendChild(Hints);
}
field.parentNode.appendChild(Hint);
+ field.onblur = function() {
+ Hint.style.visibility = "hidden";
+ }
var top = field.offsetHeight + 2;
var left = 3;
for (var obj = field; obj.id != "main" && obj.id != "menu"; obj = obj.offsetParent) {
@@ -344,6 +347,8 @@ function hintKey(field, event, tok, coy) {
return false;
}
}
+ if (event.keyCode == 13)
+ return true;
if (HintReq.readyState > 0 && HintReq.readyState < 4)
return false;
if (tok) {