jquery.suggestions: Load initial suggestions only when focused
[lhc/web/wiklou.git] / resources / src / jquery / jquery.suggestions.js
index 25f57ef..7b10149 100644 (file)
                                        } );
                                // Load suggestions if the value is changed because there are already
                                // typed characters before the JavaScript is loaded.
-                               if ( this.value !== this.defaultValue ) {
+                               if ( $( this ).is( ':focus' ) && this.value !== this.defaultValue ) {
                                        update( context, false );
                                }
                        }