diff --git a/artifacts/tx-os/src/components/executive-meetings/upcoming-meeting-alert.tsx b/artifacts/tx-os/src/components/executive-meetings/upcoming-meeting-alert.tsx index 75ab4afd..d1ea74d9 100644 --- a/artifacts/tx-os/src/components/executive-meetings/upcoming-meeting-alert.tsx +++ b/artifacts/tx-os/src/components/executive-meetings/upcoming-meeting-alert.tsx @@ -319,11 +319,15 @@ export function UpcomingMeetingAlert() { if (!st || st.pointerId !== e.pointerId) return; const w = window.innerWidth; const h = window.innerHeight; - const target = e.currentTarget.parentElement; - const elW = target?.offsetWidth ?? 360; - const elH = target?.offsetHeight ?? 160; - const x = Math.max(8, Math.min(w - elW - 8, e.clientX - st.offsetX)); - const y = Math.max(8, Math.min(h - elH - 8, e.clientY - st.offsetY)); + // Clamp against the *full panel* dimensions (panelRef), not the + // drag-handle parent, otherwise the user can drag the alert so far + // down/right that the body and action buttons spill off-screen + // until the next resize-clamp pass corrects it. + const panel = panelRef.current; + const elW = panel?.offsetWidth ?? 360; + const elH = panel?.offsetHeight ?? 160; + const x = Math.max(8, Math.min(Math.max(8, w - elW - 8), e.clientX - st.offsetX)); + const y = Math.max(8, Math.min(Math.max(8, h - elH - 8), e.clientY - st.offsetY)); setPos({ x, y }); }; const onDragEnd = (e: ReactPointerEvent) => {