From a964e0960cbe239b7306cb9f1700a2a983211b30 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sun, 16 Mar 2025 21:21:30 +0100 Subject: [PATCH] fix: download button open book --- src/components/ui/book-offline-button.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ui/book-offline-button.tsx b/src/components/ui/book-offline-button.tsx index 1f799cc..393f26d 100644 --- a/src/components/ui/book-offline-button.tsx +++ b/src/components/ui/book-offline-button.tsx @@ -219,7 +219,9 @@ export function BookOfflineButton({ book, className }: BookOfflineButtonProps) { checkStatus(); }, [book.id, checkOfflineAvailability, downloadBook, getBookStatus, setBookStatus]); - const handleToggleOffline = async () => { + const handleToggleOffline = async (e: React.MouseEvent) => { + e.stopPropagation(); // EmpĂȘcher la propagation au parent + if (!("caches" in window)) { toast({ title: "Non supportĂ©",