From a099e0a7e6243aec302cca015fd75726d2093246 Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 17 Dec 2024 16:42:11 +0800 Subject: [PATCH] fix: Adjust layout and prevent default behavior in action buttons --- .../datasets/documents/detail/completed/child-segment-list.tsx | 2 +- .../documents/detail/completed/common/action-buttons.tsx | 2 +- .../components/datasets/documents/detail/completed/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx index 8efdccbffc..fd35c0c81e 100644 --- a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx +++ b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx @@ -135,7 +135,7 @@ const ChildSegmentList: FC = ({ {isLoading ? : null} {((isFullDocMode && !isLoading) || !collapsed) - ?
+ ?
{isParagraphMode && (
diff --git a/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx b/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx index 5ade8267c2..15bff500b5 100644 --- a/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx +++ b/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx @@ -31,9 +31,9 @@ const ActionButtons: FC = ({ }) useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.s`, (e) => { + e.preventDefault() if (loading) return - e.preventDefault() handleSave() } , { exactMatch: true, useCapture: true }) diff --git a/web/app/components/datasets/documents/detail/completed/index.tsx b/web/app/components/datasets/documents/detail/completed/index.tsx index 7e99db4f55..91697db5ce 100644 --- a/web/app/components/datasets/documents/detail/completed/index.tsx +++ b/web/app/components/datasets/documents/detail/completed/index.tsx @@ -538,7 +538,7 @@ const Completed: FC = ({ { isFullDocMode ?