Skip to main content

Search and Top Navigation

#8391 closed bug (worksforme)

Opened June 10, 2012 04:38PM UTC

Closed June 11, 2012 06:45PM UTC

Autocomplete doesn't work well inside fixed position divs

Reported by: redEvo Owned by: redEvo
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.18
Keywords: Cc:
Blocked by: Blocking:
Description

If you have a div with "position:fixed" and an input tag inside, the autocomplete menu will scroll with the rest of the page. Instead, it should stay with the input tag.

The example I have doesn't look very pretty but you can see it in action here: http://jsfiddle.net/mkVje/

Try typing something in the input box to get the drop down. Then scroll the window down and you'll see the drop down move out of the way. If you were already scrolled down on the page, the search suggestions appear in the right place, but once you scroll some more it moves again.

Attachments (0)
Change History (3)

Changed June 10, 2012 07:10PM UTC by jzaefferer comment:1

owner: → redEvo
status: newpending

Autocomplete has an appendTo option. Try to set that to the fixed container element.

Changed June 11, 2012 05:12PM UTC by redEvo comment:2

status: pendingnew

That worked like a charm! Thanks. Here's the fixed version of the example: http://jsfiddle.net/mkVje/1/

Sorry for submitting it as a bug

Changed June 11, 2012 06:45PM UTC by scottgonzalez comment:3

resolution: → worksforme
status: newclosed

No problem, glad it worked.