X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fjquery%2Fjquery.suggestions.js;h=44382f0d8763152d4dc03d8942c1622499b0032b;hb=7d34c4b059bfc504f82217ac43b80f8701fcceb4;hp=3448b7a61cad60fd2bfcce224b24b7c9e683c1a6;hpb=1a6a9dd4b18a1dce5fade2e3d66dbb8e72cd2664;p=lhc%2Fweb%2Fwiklou.git 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 &&