commit 707e86dac06557efd1dca292fb17c36d139599c1
parent be9cf9f94aab687f91fdd14a76e2be6c616b87c0
Author: Alexander Burger <abu@software-lab.de>
Date: Tue, 29 Nov 2011 17:07:18 +0100
Trying "onblur" in Hint field
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/form.js b/lib/form.js
@@ -306,6 +306,10 @@ function doHint(field) {
Hint.appendChild(Hints);
}
field.parentNode.appendChild(Hint);
+ field.onblur = function() {
+ Hint.style.visibility = "hidden";
+ Item = -1;
+ }
var top = field.offsetHeight + 2;
var left = 3;
for (var obj = field; obj.id != "main" && obj.id != "menu"; obj = obj.offsetParent) {
@@ -361,6 +365,7 @@ function hintKey(field, event, tok, coy) {
if (event.keyCode != 45) { // INS
if (Beg == End) {
Hint.style.visibility = "hidden";
+ Item = -1;
return false;
}
if (coy && Hint.style.visibility == "hidden")