From da3e199c9142f47ff1245196eadd8030af7808f0 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Mon, 29 Apr 2024 18:45:59 +0100 Subject: [PATCH] Two JS small fixes (worth for main) --- crates/librqbit/webui/src/components/FileListInput.tsx | 2 +- crates/librqbit/webui/src/components/buttons/IconButton.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/librqbit/webui/src/components/FileListInput.tsx b/crates/librqbit/webui/src/components/FileListInput.tsx index 3825b24..e3f5e55 100644 --- a/crates/librqbit/webui/src/components/FileListInput.tsx +++ b/crates/librqbit/webui/src/components/FileListInput.tsx @@ -212,7 +212,7 @@ const FileTreeComponent: React.FC<{ handleToggleFile(file.id)} labelLink={fileLink(file)} diff --git a/crates/librqbit/webui/src/components/buttons/IconButton.tsx b/crates/librqbit/webui/src/components/buttons/IconButton.tsx index a5d3cd8..5af6497 100644 --- a/crates/librqbit/webui/src/components/buttons/IconButton.tsx +++ b/crates/librqbit/webui/src/components/buttons/IconButton.tsx @@ -11,6 +11,7 @@ export const IconButton: React.FC<{ props; const onClickStopPropagation: MouseEventHandler = (e) => { e.stopPropagation(); + e.preventDefault(); if (disabled) { return; }