mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 03:30:39 +09:00
Fix horizontal scroll overflow in close workspace modal
Root cause: CSS Grid items default to min-width:auto, allowing content to push the dialog wider than the viewport on mobile. - Add [&>*]:min-w-0 on DialogContent to prevent grid children from expanding beyond the container width - Keep overflow-x-hidden as safety net - Remove negative-margin sticky footer that extended beyond bounds - Revert to standard DialogFooter without negative margins Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
d3401c0518
commit
4993b5338c
1 changed files with 3 additions and 3 deletions
|
|
@ -88,7 +88,7 @@ export function ExecutionWorkspaceCloseDialog({
|
||||||
<Dialog open={open} onOpenChange={(nextOpen) => {
|
<Dialog open={open} onOpenChange={(nextOpen) => {
|
||||||
if (!closeWorkspace.isPending) onOpenChange(nextOpen);
|
if (!closeWorkspace.isPending) onOpenChange(nextOpen);
|
||||||
}}>
|
}}>
|
||||||
<DialogContent className="max-h-[85vh] overflow-x-hidden overflow-y-auto p-4 sm:max-w-2xl sm:p-6">
|
<DialogContent className="max-h-[85vh] overflow-x-hidden overflow-y-auto p-4 sm:max-w-2xl sm:p-6 [&>*]:min-w-0">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>{actionLabel}</DialogTitle>
|
<DialogTitle>{actionLabel}</DialogTitle>
|
||||||
<DialogDescription className="break-words text-xs sm:text-sm">
|
<DialogDescription className="break-words text-xs sm:text-sm">
|
||||||
|
|
@ -252,7 +252,7 @@ export function ExecutionWorkspaceCloseDialog({
|
||||||
<div className="font-medium">{action.label}</div>
|
<div className="font-medium">{action.label}</div>
|
||||||
<div className="mt-1 break-words text-muted-foreground">{action.description}</div>
|
<div className="mt-1 break-words text-muted-foreground">{action.description}</div>
|
||||||
{action.command ? (
|
{action.command ? (
|
||||||
<pre className="mt-2 max-w-full overflow-x-auto whitespace-pre-wrap break-all rounded-lg bg-background px-3 py-2 font-mono text-xs text-foreground">
|
<pre className="mt-2 whitespace-pre-wrap break-all rounded-lg bg-background px-3 py-2 font-mono text-xs text-foreground">
|
||||||
{action.command}
|
{action.command}
|
||||||
</pre>
|
</pre>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
@ -291,7 +291,7 @@ export function ExecutionWorkspaceCloseDialog({
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<DialogFooter className="sticky bottom-0 -mx-4 -mb-4 rounded-b-lg border-t border-border bg-background px-4 py-3 sm:-mx-6 sm:-mb-6 sm:px-6 sm:py-4">
|
<DialogFooter>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() => onOpenChange(false)}
|
onClick={() => onOpenChange(false)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue