Jquery Autocomplete scroll bar not appearing in IE
I am using latest version of jQuery Autocompletion plugin and have populated an array (as input for autocomplete) of about 800 entries. Now strangely when I type a letter which triggers large results (causing a scroll bar), I can see a scrollbar in Firefox but not in Internet Explorer.
I have only included the files jquery.autocomplete.css
and jquery.autocomplete.js
in my JSP. Should I need to include anything else?
Edit: my CSS is as follows:
.ac_results {
padding: 0px;
border: 1px solid black;
background-color: white;
overflow: hidden;
z-index: 99999;
}
.ac_results ul {
width: 100%;
list-style-position: outside;
list-style: none;
padding: 0;
margin: 0;
}
.ac_results li {
margin: 0px;
padding: 2px 5px;
cursor: default;
display: block;
/*
if width will be 100% horizontal scrollbar will apear
when scroll mode will be used
*/
/*width: 100%;*/
font: menu;
font-size: 12px;
/*
开发者_如何学Python it is very important, if line-height not setted or setted
in relative units scroll will be broken in firefox
*/
line-height: 16px;
overflow: hidden;
}
Adding this additional check for document.body.style.maxHeight in the jquery.autocomplete.js fixed the issue for me:
if($.browser.msie &&
((typeof document.body.style.maxHeight === "undefined") ||
(document.body.style.maxHeight == '')))
It is around line 735
Changing dtd solved the problem for me:
See this for more info: http://old.nabble.com/-autocomplete--Problem-with-Scrolling-IE-7-td20758062s27240.html
/Olle
精彩评论