From 41b58cd0279ffc860ef8b990c7dcab3fb89c97b9 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Wed, 11 Jan 2023 17:47:44 -0600 Subject: [PATCH] fix: open VS Code Remote in the same window to prevent flashing (#5684) Fixes #5676. --- .../components/VSCodeDesktopButton/VSCodeDesktopButton.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/site/src/components/VSCodeDesktopButton/VSCodeDesktopButton.tsx b/site/src/components/VSCodeDesktopButton/VSCodeDesktopButton.tsx index b7d9e9f70b..d52700da41 100644 --- a/site/src/components/VSCodeDesktopButton/VSCodeDesktopButton.tsx +++ b/site/src/components/VSCodeDesktopButton/VSCodeDesktopButton.tsx @@ -33,10 +33,7 @@ export const VSCodeDesktopButton: FC< query.set("agent", agentName) } - window.open( - `vscode://coder.coder-remote/open?${query.toString()}`, - "_blank", - ) + location.href = `vscode://coder.coder-remote/open?${query.toString()}` }) .catch((ex) => { console.error(ex)