Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Uncaught TypeError: e.getModifierState is not a function when using AutoFill in Chrome or Edge #4325

Closed
1 of 2 tasks
justin-mellor opened this issue Jan 5, 2024 · 7 comments
Assignees

Comments

@justin-mellor
Copy link

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

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

@Ryuurock

This comment has been minimized.

@DanielYuan123

This comment has been minimized.

@mivanyna
Copy link

mivanyna commented Feb 13, 2024

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:
image
image

But it seems to be a wider issue as to why would you handle events on input fields which is not the Monaco editor?

@BusinessDuck
Copy link

BusinessDuck commented Mar 5, 2024

microsoft/vscode#206883 fix is on the way

silverwind added a commit to go-gitea/gitea that referenced this issue Mar 9, 2024
Fixes: #29414

I see no way for us to catch this error, so downgrade it until
microsoft/monaco-editor#4325 is fixed, which
will likely take a few weeks to propagate up from vscode.

The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 13, 2024
Fixes: go-gitea#29414

I see no way for us to catch this error, so downgrade it until
microsoft/monaco-editor#4325 is fixed, which
will likely take a few weeks to propagate up from vscode.

The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.
6543 pushed a commit to go-gitea/gitea that referenced this issue Mar 13, 2024
Backport #29684 by @silverwind

Fixes: #29414

I see no way for us to catch this error, so downgrade it until
microsoft/monaco-editor#4325 is fixed, which
will likely take a few weeks to propagate up from vscode.

The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.

Co-authored-by: silverwind <me@silverwind.io>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Mar 13, 2024
Fixes: go-gitea/gitea#29414

I see no way for us to catch this error, so downgrade it until
microsoft/monaco-editor#4325 is fixed, which
will likely take a few weeks to propagate up from vscode.

The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.

(cherry picked from commit 9bf693d98ddf8efa058a5fbbb6a3da5e0c12ab27)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Mar 22, 2024
Backport #29684 by @silverwind

Fixes: go-gitea/gitea#29414

I see no way for us to catch this error, so downgrade it until
microsoft/monaco-editor#4325 is fixed, which
will likely take a few weeks to propagate up from vscode.

The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 462ae88fc2e6295a9376855627ad2a824a6c8f1d)
@landonmsft
Copy link

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?

@landonmsft
Copy link

@hediet If monaco-editor 0.48.0 absorbs vscode package version 1.88.0, this issue should be resolved now :)

@silverwind
Copy link
Contributor

Seems 0.48.0 has fixed it indeed.

wxiaoguang pushed a commit to go-gitea/gitea that referenced this issue Apr 27, 2024
- Update all JS dependencies
- Remove
[now-unnecessary](microsoft/monaco-editor#4325)
monaco workaround
- Update stylelint config for new rule
- Tested Monaco, Swagger UI, Mermaid
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants