fix: allow stop button to work during mobile voice recording

When recording on mobile, if the pointerup listener was lost (e.g., dragging
off the button), there was no way to stop recording. Now the stop button's
onClick handler works on mobile when recording is active, providing a fallback.
This commit is contained in:
hazre committed 2026-03-22 14:33:40 +01:00
1 parent cd80ca642e
commit 2aa9e5a960
1 file changed
+1 -1
+1 -1
View File
@@ -1246,7 +1246,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
aria-label={showAudioRecorder ? 'Stop recording' : 'Record audio message'}
aria-pressed={showAudioRecorder}
onClick={() => {
if (mobileOrTablet()) return;
if (mobileOrTablet() && !showAudioRecorder) return;
if (showAudioRecorder) {
audioRecorderRef.current?.stop();
} else {