From 4155991861eb412b1e387ff29dcd61cd967555af Mon Sep 17 00:00:00 2001 From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:32:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20prevent=20Escape=20in=20i?= =?UTF-8?q?mage=20preview=20from=20canceling=20stream?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When viewing an image preview (lightbox), pressing Escape should only close the preview dialog, not also interrupt the active AI stream. Added stopPropagation() on the Escape keydown event in the DialogContent to prevent it from bubbling to the global stream interrupt handler. --- src/browser/components/tools/shared/ToolResultImages.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/browser/components/tools/shared/ToolResultImages.tsx b/src/browser/components/tools/shared/ToolResultImages.tsx index 89c8912fbf..58c6c55ba2 100644 --- a/src/browser/components/tools/shared/ToolResultImages.tsx +++ b/src/browser/components/tools/shared/ToolResultImages.tsx @@ -118,6 +118,12 @@ export const ToolResultImages: React.FC = ({ result }) => {/* Lightbox modal for full-size image viewing */} setSelectedImage(null)}> { + // Prevent Escape from propagating to global handlers (stream interrupt) + if (e.key === "Escape") { + e.stopPropagation(); + } + }} maxWidth="90vw" maxHeight="90vh" className="flex items-center justify-center bg-black/90 p-2"