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

Fire an input event on editor.action.clipboardPasteAction #198822

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

a-stewart
Copy link
Contributor

This fixes #186998

In VS Code web, when editor.action.clipboardPasteAction is triggered (eg by right clicking on an input and selecting paste) it updates the value by setting element.value = .... However, this does not trigger the oninput handler which a the QuickInputs use to detect changes. As such right click and paste does not update the input causing #186998.

This can be fixed by updating the paste action to dispatch an input event on the element.

@a-stewart
Copy link
Contributor Author

^ The issue is that Event is imported so the constructor clashes (but somehow still works?)

I'll update the code to avoid the collision.

@a-stewart
Copy link
Contributor Author

Updated import and tests now pass

@VSCodeTriageBot VSCodeTriageBot added this to the December / January 2024 milestone Dec 13, 2023
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) December 13, 2023 15:39
@TylerLeonhardt TylerLeonhardt merged commit 81178e2 into microsoft:main Dec 13, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2024
@a-stewart a-stewart deleted the rightclick-paste-event branch February 5, 2024 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right click to paste in input dialogs does not trigger an update
4 participants