fix: custom modal

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-09-11 13:20:28 +08:00
parent d99dfbc79a
commit 8d03308091
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 4 additions and 3 deletions

View File

@ -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}
>
<CustomModalComponent>{finalChildren}</CustomModalComponent>
</div>