vector: Add tabindex back to search box
authorAlex Monk <krenair@wikimedia.org>
Sat, 24 May 2014 15:22:01 +0000 (16:22 +0100)
committerOri.livneh <ori@wikimedia.org>
Wed, 28 May 2014 16:55:26 +0000 (16:55 +0000)
Another regression, this time in Iaea60834. This brings back the
implementation as it was originally before I220057c799bef7e removed it as
part of the collapsibleNav module.

Bug: 29199
Change-Id: I3f29c3d80e43b9df16b397fff3dc983dc60652a7

resources/Resources.php
skins/vector/vector.js

index 5c2ab89..a9208db 100644 (file)
@@ -175,7 +175,10 @@ return array(
                        'vector/vector.js',
                ),
                'position' => 'top',
-               'dependencies' => 'jquery.throttle-debounce',
+               'dependencies' => array(
+                       'jquery.throttle-debounce',
+                       'jquery.tabIndex',
+               ),
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
        ),
index d8ac3c8..58ba2af 100644 (file)
@@ -2,6 +2,8 @@
  * Vector-specific scripts
  */
 jQuery( function ( $ ) {
+       $( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 );
+
        $( 'div.vectorMenu' ).each( function () {
                var $el = $( this );
                $el.find( '> h3 > a' ).parent()