Fix 'e.getModifierState is not a function' error for browser auto filled form events (#206883)

Update keyboardEvent.ts
This commit is contained in:
Dmitriy Yurov
2024-03-14 08:00:09 +00:00
committed by GitHub
parent e0baf3af8e
commit b9ca5a6339
+1 -1
View File
@@ -142,7 +142,7 @@ export class StandardKeyboardEvent implements IKeyboardEvent {
this.shiftKey = e.shiftKey;
this.altKey = e.altKey;
this.metaKey = e.metaKey;
this.altGraphKey = e.getModifierState('AltGraph');
this.altGraphKey = e.getModifierState?.('AltGraph');
this.keyCode = extractKeyCode(e);
this.code = e.code;