Skip to content
Permalink
Browse files
Autocomplete: Properly handle non-item clicks inside the suggestion l…
…ist. Fixes #6052 - Autocomplete suggestion list does not close properly.
  • Loading branch information
scottgonzalez committed Sep 20, 2010
1 parent 98a98a0 commit d380099
Showing 1 changed file with 1 addition and 1 deletion.
@@ -125,7 +125,7 @@ $.widget( "ui.autocomplete", {
// so we have to track the next mousedown and close the menu if
// the user clicks somewhere outside of the autocomplete
var menuElement = self.menu.element[ 0 ];
if ( event.target === menuElement ) {
if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
setTimeout(function() {
$( document ).one( 'mousedown', function( event ) {
if ( event.target !== self.element[ 0 ] &&

0 comments on commit d380099

Please sign in to comment.