Search and Top Navigation
#9755 closed bug (fixed)
Opened January 20, 2014 08:36PM UTC
Closed January 20, 2014 09:20PM UTC
Autocomplete: If the `appendTo` option is an empty jQuery object, it skips the check for `.ui-front`
Reported by: | MoonScript | Owned by: | scottgonzalez |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.autocomplete | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you pass an empty jQuery collection for the "appendTo" option in the autocomplete widget, it will skip the check for the closest "ui-front" element. I think it should do an extra check to handle that case, so it will be consistent in how it looks for elements to append the autocomplete menu to.
So it should check the following:
1. If "appendTo" element (node) is supplied, use it and don't check anything else.
3. If "appendTo" jQuery collection is supplied, make sure that its length is > 0. If not, go to #4. (this is where the bug exists today)
2. If "appendTo" selector (string) is supplied, look for that element. If not found, go to #4.
4. Look for closest element with a class of "ui-front". If not found, go to #5.
5. Append to the <body>.
Attachments (0)
Change History (3)
Changed January 20, 2014 08:45PM UTC by comment:1
Changed January 20, 2014 09:15PM UTC by comment:2
milestone: | none → 1.11.0 |
---|---|
owner: | → scott.gonzalez |
status: | new → assigned |
summary: | When autocomplete appendTo option is an empty jQuery collection, it skips the check for "ui-front" → Autocomplete: If the `appendTo` option is an empty jQuery object, it skips the check for `.ui-front` |
jsFiddle example that logs the element that the autocomplete menu gets appended to:
http://jsfiddle.net/MoonScript/b8A7A/