mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): give ref image wrapper explicit aspect ratio for iOS WebKit
iOS WebKit collapses a flex item to zero width when the width is only implied by a child's aspect ratio. Set aspectRatio on the wrapper Box directly so the thumbnail tile sizes correctly on iPad Chrome/Safari. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,7 @@ export const RefImagePreview = memo(() => {
|
||||
ref={dndRef}
|
||||
position="relative"
|
||||
h="full"
|
||||
aspectRatio="1/1"
|
||||
flexShrink={0}
|
||||
opacity={isDragging ? 0.3 : 1}
|
||||
data-ref-image-id={id}
|
||||
@@ -143,7 +144,15 @@ export const RefImagePreview = memo(() => {
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Box ref={dndRef} position="relative" h="full" flexShrink={0} opacity={isDragging ? 0.3 : 1} data-ref-image-id={id}>
|
||||
<Box
|
||||
ref={dndRef}
|
||||
position="relative"
|
||||
h="full"
|
||||
aspectRatio="1/1"
|
||||
flexShrink={0}
|
||||
opacity={isDragging ? 0.3 : 1}
|
||||
data-ref-image-id={id}
|
||||
>
|
||||
<Tooltip label={warnings.length > 0 ? <RefImageWarningTooltipContent warnings={warnings} /> : undefined}>
|
||||
<Flex
|
||||
position="relative"
|
||||
|
||||
Reference in New Issue
Block a user