The keypress event triggers a search suggestion window when there are
already typed characters in the search field while loading the
JavaScript.
Bug: T223422
Change-Id: I2bd79722ab20cde268fdb43338096c792b95ea28
}
$.suggestions.hide( context );
$.suggestions.cancel( context );
- } );
+ } )
+ // Simulate a keypress on load. This loads the search suggestions when there are already
+ // typed characters before the JavaScript is loaded.
+ .trigger( 'keypress' );
}
// Store the context for next time