File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -1011,30 +1011,15 @@ var NAVIGATION_KEYS = [
1011
1011
'Left' ,
1012
1012
'Esc'
1013
1013
] ;
1014
- var TEXT_INPUT_TYPES = [
1015
- 'text' ,
1016
- 'date' ,
1017
- 'datetime-local' ,
1018
- 'email' ,
1019
- 'month' ,
1020
- 'number' ,
1021
- 'password' ,
1022
- 'search' ,
1023
- 'tel' ,
1024
- 'time' ,
1025
- 'url' ,
1026
- 'week'
1027
- ] ;
1014
+
1028
1015
var keyboardFocus = false ;
1029
- var elements = document . getElementsByClassName ( 'is-keyboardFocused' ) ;
1030
1016
1031
1017
function onKeydownHandler ( event ) {
1032
1018
if ( event . ctrlKey || event . altKey || event . metaKey || NAVIGATION_KEYS . indexOf ( event . key ) === - 1 ) {
1033
1019
return ;
1034
1020
}
1035
1021
keyboardFocus = true ;
1036
1022
1037
- console . log ( document . activeElement ) ;
1038
1023
if ( document . activeElement &&
1039
1024
document . activeElement !== document . body ) {
1040
1025
document . activeElement . classList . add ( 'is-keyboardFocused' ) ;
@@ -1048,14 +1033,8 @@ function onFocusHandler(event) {
1048
1033
}
1049
1034
}
1050
1035
1051
- function onBlurHandler ( event ) {
1052
- var classList = event . target . classList ;
1053
- classList && classList . remove ( 'is-keyboardFocused' ) ;
1054
- }
1055
-
1056
1036
window . addEventListener ( 'keydown' , onKeydownHandler , true ) ;
1057
1037
window . addEventListener ( 'focus' , onFocusHandler , true ) ;
1058
- window . addEventListener ( 'blur' , onBlurHandler , true ) ;
1059
1038
1060
1039
animateCircleLoaders ( ) ;
1061
1040
window . addEventListener ( "PageFastLoaded" , enhanceAll ) ;
You can’t perform that action at this time.
0 commit comments