#6724 closed bug (worksforme)
jQueryUI does not honour DOM/CSS hierarchy
Reported by: | bmh_ca | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.autocomplete | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
hen one hovers their mouse over an autocomplete option the element containing the autocompleting input tag is no longer in 'mouseover'ed' and per the CSS rules the input tag disappears with its container. This is not the desired behaviour; I'd like to keep the input tag visible when highlighting the autocomplete selections.
I would hope and expect that it'd be possible to move the autocomplete elements to the DOM next to the input tag (i.e. x = $("#X"); x.append(x.autocomplete('widget'))), and therefore the CSS rules would keep the input and its parent visible. Alas, this doesn't work.
Here's an example: http://jsfiddle.net/U2B9f/ Here's a workaround: http://jsfiddle.net/U2B9f/1/
Change History (3)
comment:1 follow-up: 2 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Replying to scott.gonzalez:
Use the appendTo option.
That's brilliant, thanks; I would have appreciated a bit of direction (e.g. to the code -- https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.autocomplete.js) because appendTo
is not an apparent or documented option of the autocomplete plugin.
comment:3 Changed 12 years ago by
Sorry, I forgot that the docs on jqueryui.com doesn't get updated until we do a release. You can see the documentation for the appendTo option at http://docs.jquery.com/UI/Autocomplete#option-appendTo
Use the appendTo option.