]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: fixed #5349 - Autocomplete: mouseover of menu item causes data loss
authorRichard Worth <rdworth@gmail.com>
Mon, 15 Mar 2010 21:24:42 +0000 (21:24 +0000)
committerRichard Worth <rdworth@gmail.com>
Mon, 15 Mar 2010 21:24:42 +0000 (21:24 +0000)
ui/jquery.ui.autocomplete.js

index 2efd4e64b893e592d78ab1a74f91b554f0517fbe..92b9878ec39e4d7e39f44df17aa126fc48e5161e 100644 (file)
@@ -119,7 +119,9 @@ $.widget( "ui.autocomplete", {
                                        }
                                },
                                blur: function( event, ui ) {
-                                       self.element.val( self.term );
+                                       if ( self.menu.element.is(":visible") ) {
+                                               self.element.val( self.term );
+                                       }
                                }
                        })
                        .zIndex( this.element.zIndex() + 1 )