From 0ed3d2fcc185489ab811b60936fe01eceef041e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Tue, 7 Jul 2026 14:32:15 +0200 Subject: [PATCH] fix(documents): reclaim keyboard focus after the PDF preview loads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chromium's PDF viewer grabs focus asynchronously once the inline preview initialises, stranding keyboard events inside the embedded document — Escape stopped closing the detail sheet the moment a PDF rendered. Watch for the steal over a short bounded window after load and hand focus back to the dialog container; a user who clicks into the PDF afterwards is left alone. --- .../documents/document-detail-sheet.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/documents/document-detail-sheet.tsx b/src/components/documents/document-detail-sheet.tsx index 5dabcf5d8..4731e7d5a 100644 --- a/src/components/documents/document-detail-sheet.tsx +++ b/src/components/documents/document-detail-sheet.tsx @@ -96,7 +96,26 @@ function InlinePreview({