Prototype’s Autocompleter is really nice and easy to use, but out of the box it bases the width of the dropdown div on the corresponding text input. Check out line 4 here which contains the runoff of line 3 as well as the normal line 4 content.

Of course, it’s simple to stop the line from wrapping but much nicer to just take the width restriction off.

Just add setWidth: false at line 70 of controls.js, like so:
Position.clone(element, update, {
setHeight: false,
setWidth: false,
offsetTop: element.offsetHeight
});
Advertisement
Hi
Thanks!
Or, set the response LI to display:block so that it wraps neatly
Thanks a lot… it resolve my problem
@Foobar Btw your method didn’t work for me !