Here is my answer that works! If you are using Scriptaculous' Autocomplete, then the div tag closes when an onBlur event happens in IE. The IE scrollbar is not part of the <div> tag whereas in FF, the scrollbar is part of the <div> tag. So, I have a solution that works for me. (BTW - I tried other suggestions and could not get any to work.).
First, disable the hiding of the results box in controls.js.
Then, add an onclick to CLOSE X (hide) the results box to the first <li> line. If your results are long, then periodically place the CLOSE X feature among your results <li> list.
Sure, the user will have to click the "close" line, but that's okay. I hope they will click a line item instead of wanting to close the results box and stay on the same page. That way, they continue to navigate my website.
(1) In controls.js, change the hide: function () to
hide: function() {
this.stopIndicator();
// BWE put onclick event in element to close the box. Orig code closed results if clicked on IE scrollbar.
//if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
//if(this.iefix) Element.hide(this.iefix);
},
The above change will stop the closing of the box onBlur.
(2) Add to your <ul><li> list as a first item, something like below where callres is the id of the wrapper just outside the <ul> tag - the one with class="autocomplete" unless you changed that class.
<li><div onclick="jQ(\'#callres\').slideUp();" class="schclose">close x</div></li>
T-t-t-that's all!
This fix should work for all browsers.
First, disable the hiding of the results box in controls.js.
Then, add an onclick to CLOSE X (hide) the results box to the first <li> line. If your results are long, then periodically place the CLOSE X feature among your results <li> list.
Sure, the user will have to click the "close" line, but that's okay. I hope they will click a line item instead of wanting to close the results box and stay on the same page. That way, they continue to navigate my website.
(1) In controls.js, change the hide: function () to
hide: function() {
this.stopIndicator();
// BWE put onclick event in element to close the box. Orig code closed results if clicked on IE scrollbar.
//if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
//if(this.iefix) Element.hide(this.iefix);
},
The above change will stop the closing of the box onBlur.
(2) Add to your <ul><li> list as a first item, something like below where callres is the id of the wrapper just outside the <ul> tag - the one with class="autocomplete" unless you changed that class.
<li><div onclick="jQ(\'#callres\').slideUp();" class="schclose">close x</div></li>
T-t-t-that's all!