Clarify comments for broken alt in FF on Windows

This commit is contained in:
Samuel Mannehed 2019-09-24 16:00:05 +02:00 committed by Lauri Kasanen
parent 766fc43855
commit 6342a117ff

View File

@ -299,7 +299,7 @@ export default class Keyboard {
Log.Debug("<< Keyboard.allKeysUp"); Log.Debug("<< Keyboard.allKeysUp");
} }
// Firefox Alt workaround, see below // Alt workaround for Firefox on Windows, see below
_checkAlt(e) { _checkAlt(e) {
if (e.skipCheckAlt) { if (e.skipCheckAlt) {
return; return;
@ -335,9 +335,10 @@ export default class Keyboard {
// Release (key up) if window loses focus // Release (key up) if window loses focus
window.addEventListener('blur', this._eventHandlers.blur); window.addEventListener('blur', this._eventHandlers.blur);
// Firefox has broken handling of Alt, so we need to poll as // Firefox on Windows has broken handling of Alt, so we need to
// best we can for releases (still doesn't prevent the menu // poll as best we can for releases (still doesn't prevent the
// from popping up though as we can't call preventDefault()) // menu from popping up though as we can't call
// preventDefault())
if (browser.isWindows() && browser.isFirefox()) { if (browser.isWindows() && browser.isFirefox()) {
const handler = this._eventHandlers.checkalt; const handler = this._eventHandlers.checkalt;
['mousedown', 'mouseup', 'mousemove', 'wheel', ['mousedown', 'mouseup', 'mousemove', 'wheel',