Exit this Page shortcut is sometimes aborted when combining Left Shift and Right Shift #5393
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
exit this page
javascript
Description of the issue
The Exit this Page shortcut is intended to be agnostic towards whether the user uses the Left Shift key or Right Shift key, so long as the user presses one of them three times.
However, it can misfire and abort the shortcut activation if the user mixes use of both keys. Rapidly alternating Left Shift and Right Shift keys can sometimes cause both to be registered as pressed at the same time. This triggers the
lastKeyWasModified
check, which is intended to avoid accidental activation when using the Shift key for regular typing, and thus aborts the shortcut.This is very edge case-y, but it is something we can probably rectify in code.
Steps to reproduce the issue
Actual vs expected behaviour
Actual
The indicator light will briefly flicker on before disappearing, the shortcut having been aborted.
Expected
The shortcut will not be aborted as the user has only pressed shift keys.
Environment (where applicable)
Reproduced in the below, but likely applies to all browsers and operating systems that run the EtP JavaScript.
The text was updated successfully, but these errors were encountered: