fix 2 missing "local var" JavaScript statements
authorvlakoff <vlakoff@gmail.com>
Sat, 5 May 2012 13:55:50 +0000 (15:55 +0200)
committervlakoff <vlakoff@gmail.com>
Sat, 5 May 2012 13:55:50 +0000 (15:55 +0200)
Change-Id: I0e8a5824be635e526c385f3168ffc6269928a05c

resources/jquery/jquery.suggestions.js

index 55c3001..466c551 100644 (file)
@@ -103,7 +103,7 @@ $.suggestions = {
                        // Wait for the browser to update the value
                        setTimeout( function() {
                                // Render special
-                               $special = context.data.$container.find( '.suggestions-special' );
+                               var $special = context.data.$container.find( '.suggestions-special' );
                                context.config.special.render.call( $special, context.data.$textbox.val() );
                        }, 1 );
                }
@@ -311,7 +311,7 @@ $.suggestions = {
                        case 13:
                                context.data.$container.hide();
                                preventDefault = wasVisible;
-                               selected = context.data.$container.find( '.suggestions-result-current' );
+                               var selected = context.data.$container.find( '.suggestions-result-current' );
                                if ( selected.length === 0 || context.data.selectedWithMouse ) {
                                        // if nothing is selected OR if something was selected with the mouse,
                                        // cancel any current requests and submit the form