mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user