From e89491a513a2c3ed8ee853bc17a9e20184b3fe1a Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Wed, 5 Nov 2025 18:48:22 -0600 Subject: [PATCH] Change label of cancel button to close if no macro running. --- ui/src/components/popovers/PasteModal.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/src/components/popovers/PasteModal.tsx b/ui/src/components/popovers/PasteModal.tsx index c902a7c7..ff16d94a 100644 --- a/ui/src/components/popovers/PasteModal.tsx +++ b/ui/src/components/popovers/PasteModal.tsx @@ -54,10 +54,12 @@ export default function PasteModal() { }, [send, setKeyboardLayout]); const onCancelPasteMode = useCallback(() => { - cancelExecuteMacro(); + if (isPasteInProgress) { + cancelExecuteMacro(); + } setDisableVideoFocusTrap(false); setInvalidChars([]); - }, [setDisableVideoFocusTrap, cancelExecuteMacro]); + }, [isPasteInProgress, setDisableVideoFocusTrap, cancelExecuteMacro]); const onConfirmPaste = useCallback(async () => { if (!TextAreaRef.current || !selectedKeyboard) return; @@ -226,7 +228,7 @@ export default function PasteModal() {