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

Fix Copy/Cut command not working in webview #206529

Merged
merged 8 commits into from Mar 11, 2024

Conversation

yiliang114
Copy link
Contributor

Fix #141080.

After repair:
bug3kk3333

The main cause of the problem is that when you right-click the menu, the webview is actually considered to lose focus, so the copy command never gets the activeWebview value.

@security3333
Copy link

REVIEWED

Copy link
Contributor

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I think you just need to update the script-src hash in the Content-Security-Policy of index.html

I typically get the new value by launching a webview and then checking the dev tools

@mjbvz mjbvz added this to the March 2024 milestone Mar 5, 2024
@yiliang114
Copy link
Contributor Author

Nice work! I think you just need to update the script-src hash in the Content-Security-Policy of index.html干得好!我认为您只需要更新 index.htmlContent-Security-Policy 中的 script-src 哈希

I typically get the new value by launching a webview and then checking the dev tools我通常通过启动webview然后检查开发工具来获取新值

I updated this. So I infer that if a change is made to pre/index.html, updating its script-src value of Content-Security-Policy is also necessary, Right?

@yiliang114 yiliang114 requested a review from mjbvz March 6, 2024 02:41
@mjbvz mjbvz enabled auto-merge (squash) March 11, 2024 17:44
@mjbvz mjbvz merged commit d4b4c32 into microsoft:main Mar 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context-Menu COPY is not working in vscode webview, BUT ctrl+c is working fine
4 participants