Skip to content

Conversation

@a-stewart
Copy link
Contributor

This fixes #162166 and #174569

When in VS Code (web) pressing F1 does not trigger the browser help normally, but it does when in a webview.

Preventing this just requires us to call preventDefault on the event, the same as for ctrl+w and ctrl+n.

@a-stewart
Copy link
Contributor Author

a-stewart commented Feb 6, 2024

TODO - need to update the sha hashes for CSP...

Updated.

@vscodenpa vscodenpa added this to the February 2024 milestone Feb 6, 2024
@mjbvz mjbvz enabled auto-merge (squash) February 6, 2024 18:44
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 6, 2024

Thanks!

*/
function isRefresh(e) {
// 116: keyCode of "F5"
return e.keyCode === 116;
Copy link

Choose a reason for hiding this comment

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

Isn't the keyCode property being deprecated, in favor of using the KeyboardEvent.code property?

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 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

Successfully merging this pull request may close these issues.

F1 when webview is focused opens google help instead of VSCode command palette

5 participants