File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1098,7 +1098,7 @@ const Events = Module("events", {
1098
1098
1099
1099
onKeyUpOrDown : function ( event ) {
1100
1100
// Always let the event be handled by the webpage/Firefox for certain modes
1101
- if ( modes . passNextKey || modes . isMenuShown )
1101
+ if ( modes . isMenuShown )
1102
1102
return ;
1103
1103
1104
1104
let key = events . toString ( event ) ;
@@ -1115,6 +1115,11 @@ const Events = Module("events", {
1115
1115
// Many sites perform (useful) actions on keydown.
1116
1116
// Let's keep the most common ones unless we have a mapping for that
1117
1117
if ( event . type == "keydown" && this . isEscapeKey ( key ) ) {
1118
+ if ( modes . passNextKey ) {
1119
+ modes . passNextKey = false ;
1120
+ return ;
1121
+ }
1122
+
1118
1123
this . onEscape ( ) ; // We do our Escape handling here, as the on "onKeyPress" may not always work if websites override the keydown event
1119
1124
event . stopPropagation ( ) ;
1120
1125
return ;
You can’t perform that action at this time.
0 commit comments