Changesets · Branches · Tags · Compare
| Changeset | bec49a0a060ab6c81226265f2a74e48515fea088baf0860b44608fc5c5478fd9 |
|---|---|
| Author | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-07-02 16:15 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-02 16:15 -07:00 |
| Parents | 446c3209a41c, 5d05a85d8b4c |
1 file changed
modified gui/src/components/ModeSelect/ModeSelect.tsx +4 −1
| @@ -34,7 +34,10 @@ | ||
| 34 | 34 | |
| 35 | 35 | const cycleMode = useCallback(() => { |
| 36 | 36 | dispatch(setMode(mode === "chat" ? "agent" : "chat")); |
| 37 | - mainEditor?.commands.focus(); | |
| 37 | + // Only focus main editor if another one doesn't already have focus | |
| 38 | + if (!document.activeElement?.classList?.contains("ProseMirror")) { | |
| 39 | + mainEditor?.commands.focus(); | |
| 40 | + } | |
| 38 | 41 | }, [mode, mainEditor]); |
| 39 | 42 | |
| 40 | 43 | const selectMode = useCallback( |