$results.empty();
expWidth = -1;
for ( i = 0; i < context.config.suggestions.length; i++ ) {
- /*jshint loopfunc:true */
text = context.config.suggestions[ i ];
$result = $( '<div>' )
.addClass( 'suggestions-result' )
}
if ( context.config.highlightInput ) {
- $result.highlightText( context.data.prevText );
+ $result.highlightText( context.data.prevText, { method: 'prefixHighlight' } );
}
// Widen results box if needed (new width is only calculated here, applied later).
// Don't interfere with special clicks (e.g. to open in new tab)
if ( !( e.which !== 1 || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) ) {
// This will hide the link we're just clicking on, which causes problems
- // when done synchronously in at least Firefox 3.6 (bug 62858).
+ // when done synchronously in at least Firefox 3.6 (T64858).
setTimeout( function () {
$.suggestions.hide( context );
}, 0 );
// Don't interfere with special clicks (e.g. to open in new tab)
if ( !( e.which !== 1 || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) ) {
// This will hide the link we're just clicking on, which causes problems
- // when done synchronously in at least Firefox 3.6 (bug 62858).
+ // when done synchronously in at least Firefox 3.6 (T64858).
setTimeout( function () {
$.suggestions.hide( context );
}, 0 );
46, // delete
8 // backspace
];
- if ( context.data.keypressedCount === 0
- && e.which === context.data.keypressed
- && $.inArray( e.which, allowed ) !== -1
+ if ( context.data.keypressedCount === 0 &&
+ e.which === context.data.keypressed &&
+ $.inArray( e.which, allowed ) !== -1
) {
$.suggestions.keypress( e, context, context.data.keypressed );
}