d380099
click here to add a description
click here to add a homepage
The official jQuery user interface library. — Read more
http://jqueryui.com/
This URL has Read+Write access
Autocomplete: Properly handle non-item clicks inside the suggestion list. Fixes #6052 - Autocomplete suggestion list does not close properly.
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 ] &&
d380099