Opened 9 years ago
Closed 9 years ago
#9755 closed bug (fixed)
Autocomplete: If the `appendTo` option is an empty jQuery object, it skips the check for `.ui-front`
Reported by: | MoonScript | Owned by: | Scott González |
---|---|---|---|
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:
- If "appendTo" element (node) is supplied, use it and don't check anything else.
- 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)
- If "appendTo" selector (string) is supplied, look for that element. If not found, go to #4.
- Look for closest element with a class of "ui-front". If not found, go to #5.
- Append to the <body>.
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Milestone: | none → 1.11.0 |
---|---|
Owner: | set to 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` |
comment:3 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Autocomplete: Fall back to .ui-front searching for empty jQuery objects
Fixes #9755
Changeset: 2ef1b16e4d3aa8766084e50f4a1d806c434e7e43
Note: See
TracTickets for help on using
tickets.
jsFiddle example that logs the element that the autocomplete menu gets appended to: http://jsfiddle.net/MoonScript/b8A7A/