Skip to content

feat(extension): add focusTab option to prevent focus stealing on connect#1471

Open
himself65 wants to merge 1 commit intomicrosoft:mainfrom
himself65:feat-focus-tab-option
Open

feat(extension): add focusTab option to prevent focus stealing on connect#1471
himself65 wants to merge 1 commit intomicrosoft:mainfrom
himself65:feat-focus-tab-option

Conversation

@himself65
Copy link

@himself65 himself65 commented Mar 18, 2026

Summary

  • Adds a focusTab URL parameter to the extension connect page that controls whether connecting to a tab activates it and focuses its window.
  • When focusTab=false is passed, the extension skips calling chrome.tabs.update(tabId, { active: true }) and chrome.windows.update(windowId, { focused: true }), preventing focus from being stolen from the terminal.
  • Defaults to true for backward compatibility.

…nect

When connecting to a tab, the extension previously always activated the
tab and focused its window, which steals focus from the terminal. This
adds a `focusTab` URL parameter that can be set to `false` to skip
focusing. Defaults to `true` for backward compatibility.
@himself65
Copy link
Author

@microsoft-github-policy-service agree

@yury-s
Copy link
Member

yury-s commented Mar 20, 2026

Can you describe a scenario where this is needed?

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.

2 participants