Skip to content

Fix enter key behavior in integrated browser#303910

Merged
kycutler merged 1 commit intomainfrom
kycutler/enter
Mar 22, 2026
Merged

Fix enter key behavior in integrated browser#303910
kycutler merged 1 commit intomainfrom
kycutler/enter

Conversation

@kycutler
Copy link
Contributor

Fixes #303906

Copilot AI review requested due to automatic review settings March 22, 2026 19:48
@vs-code-engineering
Copy link
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/platform/browserView/electron-main/browserView.ts
  • src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorChatFeatures.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes broken Enter handling in the Integrated Browser by ensuring plain Enter is no longer rerouted through VS Code keybinding dispatch (and thus reaches the embedded page normally), while preserving the “add focused element to chat” functionality via a modified keybinding.

Changes:

  • Change “Add Focused Element to Chat” keybinding from Enter to Ctrl/Cmd+Enter when element selection is active.
  • Stop treating Enter as a “non-editing key” in BrowserView.tryHandleCommand, so it won’t be intercepted/rerouted without modifiers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorChatFeatures.ts Updates the chat-related action keybinding to avoid consuming plain Enter while still allowing an explicit modified shortcut.
src/vs/platform/browserView/electron-main/browserView.ts Ensures plain Enter is handled natively by the embedded page by removing it from the non-editing reroute set.

@kycutler kycutler enabled auto-merge (squash) March 22, 2026 19:58
@kycutler kycutler merged commit 117e3e6 into main Mar 22, 2026
23 checks passed
@kycutler kycutler deleted the kycutler/enter branch March 22, 2026 20:02
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.

Enter key broken in some integrated browser scenarios

3 participants