Scriptaculous / Prototype IE 8 Autocomplete disappearing problem

In Internet Explorer 8, it seems that Scriptaculous / Prototype sometimes miscalculate exactly where to place the autocomplete box. As a result, it will usually not show up at all, since it’s off the screen. The trick here is that it’s calculating a left and top absolute position that are wrong, and then writing them directly to the element as inline styles.

The solution, though a bit of a hack, is to write styles for the div container that use the !important rule, which will override any inline styles. Here’s what the fix should look like:


#my_auto_complete {
position: relative !important;
top: -10px !important;
left: 0px !important;
}

Comments are closed.