Opened 7 years ago

Closed 7 years ago

#8391 closed bug (worksforme)

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.

Change History (3)

comment:1 Changed 7 years ago by Jörn Zaefferer

Owner: set to redEvo
Status: newpending

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

comment:2 Changed 7 years ago by redEvo

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

comment:3 Changed 7 years ago by Scott González

Resolution: worksforme
Status: newclosed

No problem, glad it worked.

Note: See TracTickets for help on using tickets.