ui
ui copied to clipboard
fix: issue #16 - dialogue overflow
Potential fix for Issue #16 . Added an overflow-y-auto
and max-h-[500px]
to the DialogPrimitive.Content
. Solution doesn't consider screens less than 500px in height. Could always add some responsive options there.
Someone is attempting to deploy a commit to a Personal Account owned by @shadcn on Vercel.
@shadcn first needs to authorize it.
This would not be the desired behavior imo. It is undesirable to have the scroll bar inside of the dialog and to cut at a specific height.
(consider having content of height 550px and then having to scroll for the last 50px given that the screen has height > 550px)
Rather display the dialog in full height but make its parent handle the overflow. This way the scroll bar will not be inside the content and the dialogs content doesn’t get cut.
This seems to shed some light on a possible solution: https://github.com/radix-ui/primitives/issues/887
Looks like converting the <DialogOverlay>
component to accept children is the suggestion, and that does provide the scrollbar outside of the Dialog as intended. However, I'm not sure how to best handle having the dialog centered for small content, without then having that same content overflow the top and bottom of the window when the content is lengthy.
Will keep plugging away at it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
next-template | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 4, 2023 at 6:47AM (UTC) |