fix: overlay lightbox captions without shifting image

This commit is contained in:
TerryM
2026-05-28 18:40:17 +08:00
parent ef1f3163eb
commit 5ca38a0eca

View File

@@ -169,11 +169,7 @@ function LightboxView({
</>
) : null}
<div
className={`flex min-h-0 w-full flex-1 items-center justify-center px-4 pt-16 ${
showCaption ? "pb-3" : "pb-16"
}`}
>
<div className="flex min-h-0 w-full flex-1 items-center justify-center px-4 py-16">
<div
className="flex h-full w-full items-center justify-center"
onClick={(e) => {
@@ -204,7 +200,7 @@ function LightboxView({
{showCaption ? (
<div
className="shrink-0 border-t border-white/10 bg-gradient-to-t from-black via-black/90 to-black/70 px-4 py-4 text-sm leading-snug text-white sm:px-6"
className="absolute inset-x-0 bottom-0 z-20 bg-gradient-to-t from-black via-black/90 to-black/70 px-4 py-4 text-sm leading-snug text-white sm:px-6"
onClick={(e) => e.stopPropagation()}
>
<div className="message-stream-copyable-text mx-auto max-h-[32vh] max-w-[920px] overflow-y-auto whitespace-pre-wrap break-words [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">