fix(modal): adjust modal header drag and resize behavior

- Moved drag and resize event handlers to Dialog.Title for better interaction
- Removed unnecessary console.log statement
- Simplified modal header interaction logic

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-02-22 15:35:26 +08:00
parent 577f07f85e
commit 38e8c6c2f4
@@ -361,12 +361,12 @@ export const ModalInternal = memo(
defaultSize={resizeDefaultSize}
className="flex grow flex-col"
>
<div
className={"relative flex items-center"}
onPointerDownCapture={handleDrag}
onPointerDown={relocateModal}
>
<Dialog.Title className="flex w-0 max-w-full grow items-center gap-2 px-4 py-1 text-lg font-semibold">
<div className={"relative flex items-center"}>
<Dialog.Title
className="flex w-0 max-w-full grow items-center gap-2 px-4 py-1 text-lg font-semibold"
onPointerDownCapture={handleDrag}
onPointerDown={relocateModal}
>
{!!icon && <span className="size-4">{icon}</span>}
<EllipsisHorizontalTextWithTooltip className="truncate">
<span>{title}</span>