Set tabindex to 1 for the search box in Timeless skin

When using the Vector skin, and you load a page and press the tab
button on the keyboard once, the cursor focus on the search box,
this is handy and now available on the timeless skin too.

Also, removed target "mobile" as "jquery.tabIndex" dependency doesn't
use it.

Bug: T201424
Change-Id: I6e5d96371b5342ad2d3a207e980ec1fcf7e2de99
isekai
Alangi Derick 7 years ago
parent b4e441935e
commit 734a7f7222

@ -0,0 +1,11 @@
/**
* Timeless-specific scripts
*/
jQuery( function ( $ ) {
/**
* Focus on search box when 'Tab' key is pressed once
*/
$( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 );
} );

@ -57,9 +57,12 @@
] ]
}, },
"skins.timeless.js": { "skins.timeless.js": {
"targets": [ "desktop", "mobile" ], "targets": [ "desktop" ],
"scripts": [ "scripts": [
"resources/main.js" "resources/main.js"
],
"dependencies": [
"jquery.tabIndex"
] ]
}, },
"skins.timeless.mobile": { "skins.timeless.mobile": {

Loading…
Cancel
Save