From 346176882926e4f4057c9c2634fb97596f6b97ce Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Tue, 19 Feb 2013 20:21:37 +0100 Subject: [PATCH] (bug 44988) unbreak $.suggestions up/down arrow navigation [regression] It was borked in I87940ca8 due to a superfluous dot. Change-Id: If7bfb25a4c9e9f01a8acdaeabfe18c346dfea03d --- resources/jquery/jquery.suggestions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/jquery/jquery.suggestions.js b/resources/jquery/jquery.suggestions.js index 3448b7a61c..44382f0d87 100644 --- a/resources/jquery/jquery.suggestions.js +++ b/resources/jquery/jquery.suggestions.js @@ -309,11 +309,11 @@ $.suggestions = { var selected = context.data.$container.find( '.suggestions-result-current' ); if ( !result.get || selected.get( 0 ) !== result.get( 0 ) ) { if ( result === 'prev' ) { - if( selected.is( '.suggestions-special' ) ) { + if( selected.hasClass( 'suggestions-special' ) ) { result = context.data.$container.find( '.suggestions-result:last' ); } else { result = selected.prev(); - if ( !( result.length && result.hasClass( '.suggestions-result' ) ) ) { + if ( !( result.length && result.hasClass( 'suggestions-result' ) ) ) { // there is something in the DOM between selected element and the wrapper, bypass it result = selected.parents( '.suggestions-results > *' ).prev().find( '.suggestions-result' ).eq(0); } @@ -337,12 +337,12 @@ $.suggestions = { } } else { result = selected.next(); - if ( !( result.length && result.hasClass( '.suggestions-result' ) ) ) { + if ( !( result.length && result.hasClass( 'suggestions-result' ) ) ) { // there is something in the DOM between selected element and the wrapper, bypass it result = selected.parents( '.suggestions-results > *' ).next().find( '.suggestions-result' ).eq(0); } - if ( selected.is( '.suggestions-special' ) ) { + if ( selected.hasClass( 'suggestions-special' ) ) { result = $( [] ); } else if ( result.length === 0 && -- 2.20.1