Don't replace user text with suggestion in searchbox
authorm4tx <m4tx@m4tx.pl>
Fri, 2 Jan 2015 01:26:26 +0000 (02:26 +0100)
committerm4tx <m4tx@m4tx.pl>
Fri, 2 Jan 2015 01:26:26 +0000 (02:26 +0100)
On Enter press, there was highlight() called, which also replaced the text.
Since it seems to have no use here (highlight() highlights the selected
suggestion in the box, but the box is immediately hidden, and there's
probably no case when the suggestion is chosen, but the text in searchbox
does not match it), it was removed.

Bug: T53900
Change-Id: I9fc2e954ae429ba166ddc7c713f9790a25a837c2

resources/src/jquery/jquery.suggestions.js

index 3369cde..a83a70a 100644 (file)
@@ -474,8 +474,6 @@ $.suggestions = {
                                                }
                                        }
                                } else {
-                                       $.suggestions.highlight( context, selected, true );
-
                                        if ( typeof context.config.result.select === 'function' ) {
                                                // Allow the callback to decide whether to prevent default or not
                                                if ( context.config.result.select.call( selected, context.data.$textbox ) === true ) {