Matmarex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49850


Change subject: (bug 44988) unbreak $.suggestions up/down arrow navigation 
[regression]
......................................................................

(bug 44988) unbreak $.suggestions up/down arrow navigation [regression]

It was borked in I87940ca8 due to a superfluous dot.

Change-Id: If7bfb25a4c9e9f01a8acdaeabfe18c346dfea03d
---
M resources/jquery/jquery.suggestions.js
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/49850/1

diff --git a/resources/jquery/jquery.suggestions.js 
b/resources/jquery/jquery.suggestions.js
index 3448b7a..44382f0 100644
--- a/resources/jquery/jquery.suggestions.js
+++ b/resources/jquery/jquery.suggestions.js
@@ -309,11 +309,11 @@
                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 @@
                                        }
                                } 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 &&

-- 
To view, visit https://gerrit.wikimedia.org/r/49850
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7bfb25a4c9e9f01a8acdaeabfe18c346dfea03d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to