Merge "Fix tabindex applied twice on RC top section"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.RcTopSectionWidget.js
index f0e1241..2c99d3d 100644 (file)
@@ -33,7 +33,6 @@
                } );
 
                this.$topLinks
-                       .addClass( 'mw-rcfilters-ui-ready' )
                        .makeCollapsible( {
                                collapsed: topLinksCookieValue === 'collapsed',
                                $customTogglers: toplinksTitle.$element
@@ -49,7 +48,8 @@
                                widget.switchTopLinks( 'collapsed' );
                        } );
 
-               this.$topLinks.find( '.mw-recentchanges-toplinks-title' ).replaceWith( toplinksTitle.$element );
+               this.$topLinks.find( '.mw-recentchanges-toplinks-title' )
+                       .replaceWith( toplinksTitle.$element.removeAttr( 'tabIndex' ) );
 
                // Create two positions for the toplinks to toggle between
                // in the table (first cell) or up above it
@@ -63,7 +63,6 @@
                this.$element
                        .addClass( 'mw-rcfilters-ui-rcTopSectionWidget' )
                        .append(
-                               this.$top,
                                $( '<div>' )
                                        .addClass( 'mw-rcfilters-ui-table' )
                                        .append(
@@ -84,6 +83,9 @@
                                        )
                        );
 
+               // Hack: For jumpiness reasons, this should be a sibling of -head
+               $( '.rcfilters-head' ).before( this.$top );
+
                // Initialize top links position
                widget.switchTopLinks( topLinksCookieValue );
        };