Search and Top Navigation
#5611 closed enhancement (wontfix)
Opened May 14, 2010 04:22AM UTC
Closed May 14, 2010 10:47AM UTC
Last modified October 11, 2012 09:15PM UTC
Autocomplete: append item list to input instead of body
Reported by: | bleeblee | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.autocomplete | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The documentation seems to imply the item list will be appended to the input tag (excerpt pasted below). But the item list is appended to the body. This will often cause the item list to be outside of the div containing the input, which can cause style problems. Would it be better to append the item list to the input?
=
Sample markup with jQuery UI CSS Framework classes
<input class="ui-autocomplete-input"/>
<ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all">
<li class="ui-menu-item">
<a class="ui-corner-all">item 1</a>
</li>
<li class="ui-menu-item">
<a class="ui-corner-all">item 2</a>
</li>
<li class="ui-menu-item">
<a class="ui-corner-all">item 3</a>
</li>
</ul>
The element has to be placed at the end of the body to ensure it is the top-most displayed element. In IE, DOM order trumps z-index.