Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13052 closed bug (notabug)

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

Reported by: Rodrigo Rosenfeld Rosas <[email protected]…> Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:


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 );

Change History (4)

comment:1 Changed 10 years ago by scottgonzalez

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.


comment:2 Changed 10 years ago by Rodrigo Rosenfeld Rosas <[email protected]…>

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.


comment:3 Changed 10 years ago by Rodrigo Rosenfeld Rosas <[email protected]…>

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

comment:4 Changed 10 years ago by Rodrigo Rosenfeld Rosas <[email protected]…>

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?

Note: See TracTickets for help on using tickets.