Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const WorkItemsModal: React.FC<Props> = observer((props) => {
>
<div
className={`flex h-full flex-col overflow-hidden border-custom-border-200 bg-custom-background-100 text-left ${
fullScreen ? "rounded-lg border m-2" : "border-l"
fullScreen ? "rounded-lg border" : "border-l"
}`}
>
<WorkItemsModalHeader
Expand Down
2 changes: 1 addition & 1 deletion packages/propel/src/portal/modal-portal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const ModalPortal: React.FC<ModalPortalProps> = ({

const content = (
<div
className={cn("fixed inset-0 h-full w-full overflow-y-auto", className)}
className={cn("absolute inset-0 h-full w-full overflow-y-auto", className)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Restore fixed positioning on the portal container

Switching the wrapper from fixed to absolute means the overlay and dialog now scroll with the document. On long pages the modal slides off-screen as soon as the user scrolls, defeating the purpose of a modal overlay. We still need it anchored to the viewport. Please keep this element position: fixed.

-      className={cn("absolute inset-0 h-full w-full overflow-y-auto", className)}
+      className={cn("fixed inset-0 h-full w-full overflow-y-auto", className)}
🤖 Prompt for AI Agents
In packages/propel/src/portal/modal-portal.tsx around line 92 the wrapper is
using absolute positioning (className includes "absolute"), which causes the
overlay and dialog to scroll with the document; change the positioning back to
fixed by replacing the "absolute" class with "fixed" so the portal is anchored
to the viewport and the modal overlay/dialog stay visible when the page scrolls.

style={{ zIndex: MODAL_Z_INDEX }}
role="dialog"
>
Expand Down
Loading