From 8d03308091a57745489bb48617b7e11134bb89c3 Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 11 Sep 2024 13:20:28 +0800 Subject: [PATCH] fix: custom modal Signed-off-by: Innei --- src/renderer/src/components/ui/modal/stacked/modal.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/ui/modal/stacked/modal.tsx b/src/renderer/src/components/ui/modal/stacked/modal.tsx index 5fcf7c8a2..34b6f4462 100644 --- a/src/renderer/src/components/ui/modal/stacked/modal.tsx +++ b/src/renderer/src/components/ui/modal/stacked/modal.tsx @@ -257,9 +257,8 @@ export const ModalInternal = memo( currentIsClosing ? "!pointer-events-none" : "!pointer-events-auto", modalContainerClassName, )} - onClick={ - modal ? (clickOutsideToDismiss && canClose ? dismiss : noticeModal) : undefined - } + onPointerUp={handleDetectSelectEnd} + onClick={handleClickOutsideToDismiss} style={zIndexStyle} > {DragBar} @@ -267,6 +266,8 @@ export const ModalInternal = memo( className={cn("contents", modalClassName)} onClick={stopPropagation} ref={modalElementRef} + onSelect={handleSelectStart} + onKeyUp={handleDetectSelectEnd} > {finalChildren}