Skip to main content

Search and Top Navigation

#9056 closed bug (invalid)

Opened February 04, 2013 07:17PM UTC

Closed February 19, 2013 08:58AM UTC

Autocomplete: Menu resizing should respect position.of option

Reported by: xinix00 Owned by: xinix00
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.10.0
Keywords: Cc:
Blocked by: Blocking:
Description

When using AutoCompletion plugin, the _resizeMenu function won't take options.position.of into account.

Lets say I've got the following situation:

<div class='container-autocomplete' style='margin: 10px'>

<input type='text' />

</div>

$(".container-autocomplete input", element).autocomplete({

minLength: 0,

position: {

of: $(this).parent(), This is the line we append the autocomplete to

at: "left bottom-1"

});

The menu won't get resized to the position.of, but to the <input> tag.

AutoComplete _resizeMenu:

_resizeMenu: function() {

var ul = this.menu.element;

ul.outerWidth( Math.max(

Firefox wraps long text (possibly a rounding bug)

// so we add 1px to avoid the wrapping (#7513)

ul.width( "" ).outerWidth() + 1,

this.options.position.of == null ? this.element.outerWidth() : this.options.position.of.outerWidth()

) );

},

I guess this solution suits better than the current one, which will give the size of the element itself instead of the element you want to position it on.

But this might also be a developer choise.

Attachments (0)
Change History (2)

Changed February 04, 2013 07:30PM UTC by scottgonzalez comment:1

component: ui.widgetui.autocomplete
owner: → xinix00
status: newpending
summary: Autocompletion: option.position.of, wrong resizementAutocomplete: Menu resizing should respect position.of option

When not aligning to the input, do you even want it to match up with the of option or just take up the necessary space based on the suggestions?

Changed February 19, 2013 08:58AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!