fix(chat): restore scroll after image viewer return

This commit is contained in:
2026-07-01 17:15:38 +08:00
parent 5f9df58dbe
commit fa5b380577
4 changed files with 205 additions and 4 deletions
+3 -1
View File
@@ -19,6 +19,7 @@ import {
} from "@/lib/chat/chat_media_url";
import { useCachedChatMediaUrl } from "@/lib/chat/use_cached_chat_media_url";
import { requestChatScrollSnapshotSave } from "../chat-scroll-session";
import styles from "./image-bubble.module.css";
export interface ImageBubbleProps {
@@ -46,7 +47,8 @@ export function ImageBubble({
const openImage = () => {
if (!messageId) return;
router.push(ROUTE_BUILDERS.chatImage(messageId));
requestChatScrollSnapshotSave();
router.push(ROUTE_BUILDERS.chatImage(messageId), { scroll: false });
};
return (