Skip to content

Commit

Permalink
fix(modal): adjust modal header drag and resize behavior
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Innei committed Feb 22, 2025
1 parent 577f07f commit 38e8c6c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/renderer/src/components/ui/modal/stacked/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 38e8c6c

Please sign in to comment.