diff --git a/frontend/src/app/pages/Dashboard/desktop/DesktopSpawnPill.tsx b/frontend/src/app/pages/Dashboard/desktop/DesktopSpawnPill.tsx index cac473c4..faffeaa4 100644 --- a/frontend/src/app/pages/Dashboard/desktop/DesktopSpawnPill.tsx +++ b/frontend/src/app/pages/Dashboard/desktop/DesktopSpawnPill.tsx @@ -1,4 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; +import { comboDisplay, dictationDefaultCombo } from '@/app/pages/Settings/sections/general/ShortcutRecorderChip'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; import Tooltip from '@mui/material/Tooltip'; @@ -160,7 +161,7 @@ function DesktopSpawnPill({ > - + { if (holdMode) { + // A TAP while recording must stop: the quick tap's press-end fires before the async start + // flips state to 'recording', so without this the mic could be started by a click but never + // stopped by one. + if (stateRef.current === 'recording') { heldRef.current = false; void stop(); return; } if (stateRef.current === 'idle') { heldRef.current = true; void start(); } } else { toggle(); } - }, [holdMode, start, toggle]); + }, [holdMode, start, stop, toggle]); const pressEnd = useCallback((): void => { if (holdMode && heldRef.current) {