From b42cb3b032219464915ceeb8612ce5cee58350ef Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Thu, 1 Jan 2026 19:39:40 +0800 Subject: [PATCH] fix: allow scroll button tap when idle --- static/src/composables/useScrollControl.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/static/src/composables/useScrollControl.ts b/static/src/composables/useScrollControl.ts index ee111c6..07da91a 100644 --- a/static/src/composables/useScrollControl.ts +++ b/static/src/composables/useScrollControl.ts @@ -54,9 +54,16 @@ export function conditionalScrollToBottom(ctx: ScrollContext) { } export function toggleScrollLock(ctx: ScrollContext) { - const nextState = ctx.chatToggleScrollLockState?.() ?? false; const active = typeof ctx.isOutputActive === 'function' ? ctx.isOutputActive() : true; - if (nextState && active) { + + // 没有模型输出时:允许点击,但不切换锁定,仅单次滚动到底部 + if (!active) { + scrollToBottom(ctx); + return ctx.autoScrollEnabled ?? false; + } + + const nextState = ctx.chatToggleScrollLockState?.() ?? false; + if (nextState) { scrollToBottom(ctx); } return nextState;