Skip to main content

Search and Top Navigation

Ticket #5405: mousedownfix-5405.patch


File mousedownfix-5405.patch, 0.6 KB (added by jzaefferer, May 15, 2010 02:20PM UTC)

Patch to cancel blur-closing-timeout on mousedown on menu

diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 64c098a..6460d62 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -109,6 +109,12 @@ $.widget( "ui.autocomplete", {
 		this.menu = $( "
    " ) .addClass( "ui-autocomplete" ) .appendTo( "body", doc ) + .mousedown(function() { + // use another timeout to make sure the blur-event-handler on the input was already triggered + setTimeout(function() { + clearTimeout( self.closing ); + }, 13); + }) .menu({ focus: function( event, ui ) { var item = ui.item.data( "item.autocomplete" );

    Download in other formats:

    Original Format