monaco-editor
monaco-editor copied to clipboard
[Bug] Uncaught TypeError: e.getModifierState is not a function when using AutoFill in Chrome or Edge
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.45.0#XQAAAALPAQAAAAAAAABBqQkHQ5NjdWX_QlY8elt1pNs_6w0JpADsxkIibQ4UF1H1DOiVjoiCcXryotF3-FScMrdUTFY2N9rYW7Rvn8toGAduu845WKA_3gtIsou2w81P-Nn1qpd1PJbYFe457jNKMRsobVqDRNkd5gMoxJoz7UwsJx8lmnhOk9tyuUtMpWa5IdrO74lmGLe2Vp7a7q1pG8XNQz4_jhk_70sjpNwkiiLhJuyFxGCRQ6QPhHckAjHy2l7jWkpKOKZbiml25iQU5paF87C-3t-tBbk_QHJmbrw7Cnlq8vs_LCWrOnLtgzLOnshAZbkd8Eldg8n7gNXPGttEhyxcTilGPuctsyea3jMyaCxeHhFDBURIaREWTxyJ6-QtSrcSufWfkK-VI8hFfXTLm9xGSs6r3RLrm6ZZ3_CpAmtLqp2-FZk3_uM-oWTYuLxeI6T_kXvpI55SKy7BS_42ZyJ-72YRLblgoUJMD1n_77MOAQ
Monaco Editor Playground Code
No response
Reproduction Steps
Using Chrome or Edge Enter some text in the text box "Use AutoFill to populate this textbox" Click Reload to populate your auto fill buffer in the browser Now click inside the text box "Use AutoFill to populate this textbox" Choose your text from the "Saved data" dropdown
Actual (Problematic) Behavior
In the console an error is thrown
Uncaught TypeError: e.getModifierState is not a function
at new StandardKeyboardEvent (keyboardEvent.ts:111:24)
at HTMLBodyElement.<anonymous> (dom.ts:178:18)
Expected Behavior
No error should be thrown
Additional Context
No response
+11111111111111111111
+1
Getting the error as well after the monaco editor was initialized across the whole app on any input field (not the editor).
Error appears in the constructor of StandardKeyboardEvent class as Event is not a KeyboardEvent and doesn't have that method:
But it seems to be a wider issue as to why would you handle events on input fields which is not the Monaco editor?
https://github.com/microsoft/vscode/pull/206883 fix is on the way
I see that this is fixed by that PR being merged in. What Monaco version do we need to update to, to consume this fix?
@hediet If monaco-editor 0.48.0 absorbs vscode package version 1.88.0, this issue should be resolved now :)
Seems 0.48.0 has fixed it indeed.