diff --git a/pkgs/id/web/src/cursors.ts b/pkgs/id/web/src/cursors.ts index 8356921b38..9a3cf16847 100644 --- a/pkgs/id/web/src/cursors.ts +++ b/pkgs/id/web/src/cursors.ts @@ -199,6 +199,9 @@ function updateCursorChrome(viewState: CursorViewState): void { modeButton.addEventListener("click", () => { viewState.tooltipMode = nextTooltipMode(viewState.tooltipMode); refreshCursorUx(viewState); + // updateCursorChrome rebuilds the controls; keep keyboard focus on the + // replacement toggle instead of dropping it onto the document body. + chrome.querySelector(".collab-cursor-mode")?.focus(); }); chrome.appendChild(modeButton);