Changesets · Branches · Tags · Compare
| Changeset | 5d05a85d8b4cb583dec13c9e47407b8bdab3d87c62bf9034d542bd6cd4290d51 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-07-01 12:20 -07:00 |
| Committer | Dallin Romney <dallinromney@gmail.com> · 2025-07-01 12:20 -07:00 |
| Parents | 54bc82ab2ee9 |
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( |