Skip to main content

Bug Tracker

Side navigation

#13052 closed bug (notabug)

Opened December 13, 2012 09:07PM UTC

Closed December 13, 2012 09:55PM UTC

Last modified December 14, 2012 12:19PM UTC

Autocomplete doesn't close opened selection box when in drop-down mode

Reported by: Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:
Description

See this example: http://jqueryui.com/autocomplete/#combobox

It used to close when it was opened and you clicked on the arrow. If you look at the source-code for the example you'll notice that this was intended:

// close if already visible
if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
    input.autocomplete( "close" );
    removeIfInvalid( input );
    return;
}

Attachments (0)
Change History (4)

Changed December 13, 2012 09:55PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

This is related to jQuery UI, not jQuery core. I would say to file a bug at http://bugs.jqueryui.com, but I've already fixed this.

Thanks.

Changed December 14, 2012 11:41AM UTC by Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> comment:2

Ah, I guess that explains why I was sure I had an "rosenfeld" account but wasn't able to log-in :)

I didn't find the jQuery UI tickets link yesterday when I looked for it so I thought they were integrated with jQuery bug tracker system.

Today I could find the link in the bottom of the page. Maybe you should include it also in the top menus (under Support maybe).

Thanks for fixing, I'll take a look at the commit to patch it myself as I can't use master due to some incompatible changes to the tabs API. Maybe you have already applied it to the 1.9 branch, I'll take a look.

Cheers

Changed December 14, 2012 11:43AM UTC by Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> comment:3

Ah, I see you didn't change the library itself, just the example code. Great, I'll give it a try :)

Changed December 14, 2012 12:19PM UTC by Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> comment:4

I basically fixed it in my code by handling "mousedown" instead of "click" and removing the "input.autocomplete('close')". But then it worked in my development environment but "input.autocomplete 'search', ''" didn't have any effect when deployed to our servers (when debugging on Chrome developer's tool I noticed it was indeed being called).

I had to change to this for it to work on the production servers:

setTimeout(function(){input.autocomplete('search', '')}, 0)

Any ideas why?