this.containerRow = 0; // height of result field in the container
this.containerTotal = 0; // total height of the container will all results
this.visible = false; // if container is visible
+ this.stayHidden = false; // don't try to show if lost focus
}
/** Hide results div */
function os_showResults(r){
if(os_is_stopped)
return;
+ if(r.stayHidden)
+ return
os_fitContainer(r);
var c = document.getElementById(r.container);
r.selected = -1;
/** Init timed update via os_delayedUpdate() */
function os_fetchResults(r, query, timeout){
if(query == ""){
+ r.query = "";
os_hideResults(r);
return;
} else if(query == r.query)
var r = os_map[targ.id];
if(r == null)
return; // not our event
- if(!os_mouse_pressed)
+ if(!os_mouse_pressed){
os_hideResults(r);
+ r.stayHidden = true
+ }
}
/** Event: focus (catch only when stopped) */
function os_eventFocus(e){
- // nothing happens here?
+ var targ = os_getTarget(e);
+ var r = os_map[targ.id];
+ if(r == null)
+ return; // not our event
+ r.stayHidden = false
}