minibar: don't force focus to the typed input field after every word

On touch-based devices, the on-screen keyboard kept popping up after every word,
which was very annoying if you were entering a sentence by tapping on the
magnets.
This commit is contained in:
hallgren
2011-03-22 15:17:48 +00:00
parent b3e5386d36
commit 22a70d2608

View File

@@ -244,18 +244,16 @@ Minibar.prototype.target_lang=function() {
Minibar.prototype.add_typed_input=function() {
with(this) {
var inp;
if(surface.typed) inp=surface.typed;
else {
inp=empty("input","type","text");
if(!surface.typed) {
var inp=empty("input","type","text");
inp.value="";
inp.setAttribute("accesskey","t");
inp.style.width="10em";
inp.onkeyup=bind(complete_typed,this);
surface.appendChild(inp);
surface.typed=inp;
inp.focus();
}
inp.focus();
}
}