Skip to content

Commit 1e4c442

Browse files
committed
Merge pull request #285 from airodactyl/fix-ignore-esc
Fix Esc in Ignore mode
2 parents 094ae5b + 5dfd882 commit 1e4c442

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

common/content/events.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ const Events = Module("events", {
10981098

10991099
onKeyUpOrDown: function (event) {
11001100
// Always let the event be handled by the webpage/Firefox for certain modes
1101-
if (modes.passNextKey || modes.isMenuShown)
1101+
if (modes.isMenuShown)
11021102
return;
11031103

11041104
let key = events.toString(event);
@@ -1115,6 +1115,11 @@ const Events = Module("events", {
11151115
// Many sites perform (useful) actions on keydown.
11161116
// Let's keep the most common ones unless we have a mapping for that
11171117
if (event.type == "keydown" && this.isEscapeKey(key)) {
1118+
if (modes.passNextKey) {
1119+
modes.passNextKey = false;
1120+
return;
1121+
}
1122+
11181123
this.onEscape(); // We do our Escape handling here, as the on "onKeyPress" may not always work if websites override the keydown event
11191124
event.stopPropagation();
11201125
return;

0 commit comments

Comments
 (0)