Browse files

fixed problem that prevents you from selecting text

git-svn-id: svn+ssh://torus.jp/home/toru/svn/misc/webdict@70 1f37519a-7ad4-497f-bc20-5d7ca8e04135
  • Loading branch information...
1 parent d05d966 commit 843e051a5a48968a679f527a1dbeafb653daa570 toru committed Jun 18, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 index.html
View
8 index.html
@@ -36,8 +36,6 @@
var changed = false;
return function () {
- document.getElementById ("word").focus ();
-
var text = document.getElementById ("word").value.toLowerCase();
if (text.length > 0) {
@@ -60,17 +58,19 @@
httpObj.send (null);
} else {
document.getElementById ("debug").innerHTML = idlecount;
- if (idlecount > 5) {
+ if (idlecount == 5) {
var text = document.getElementById ("word");
text.focus ();
text.select ();
- } else
+ }
+ if (idlecount < 6)
idlecount ++;
}
}
};
}
+setTimeout (function (){document.getElementById ("word").focus ();}, 100);
setInterval (make_interval_func (), 1000);
// --></script>
</head>

0 comments on commit 843e051

Please sign in to comment.