Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

View File

@@ -0,0 +1,19 @@
var keyboardNavigation = false,
keyboardNavigationKeycodes = [ 9, 32, 37, 38, 39, 40 ]; // keyCodes for tab, space, left, up, right, down respectively
document.addEventListener( 'keydown', function( event ) {
if ( keyboardNavigation ) {
return;
}
if ( keyboardNavigationKeycodes.indexOf( event.keyCode ) !== -1 ) {
keyboardNavigation = true;
document.documentElement.classList.add( 'accessible-focus' );
}
} );
document.addEventListener( 'mouseup', function() {
if ( ! keyboardNavigation ) {
return;
}
keyboardNavigation = false;
document.documentElement.classList.remove( 'accessible-focus' );
} );