Skip to content

[Bug]网页端聊天时,当输入内容过长,会把对话信息挡住 #9478

Closed

Description

@Lxeon

What happened / 发生了什么

网页端聊天时,当输入内容过长,会把对话信息挡住

Reproduce / 如何复现?

一轮会话后,输入框不断回车

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

4.26.8、docker、new-api

OS

Linux

Logs / 报错日志

Image

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Activity

  1. added
    area:webuiThe bug / feature is about webui(dashboard) of astrbot.
    feature:chatuiThe bug / feature is about astrbot's chatui, webchat
    on Jul 31, 2026
  2. dosubot commented on Jul 31, 2026

    @dosubot

    这个问题的根本原因已经定位到了:聊天界面的布局架构导致输入框在扩展时会遮挡消息。

    根因分析:

    • .composer-shell(输入区域容器)使用 position: absolute 定位在消息列表底部 [1]
    • 消息区域 .messages-panel 的底部 padding 是固定值 116px(桌面端)/ 92px(移动端),用于为输入框预留空间 [1]
    • 但 textarea 的 max-height 最大可达 min(48vh, 420px) [2]
    • 当输入内容不断增多(如不断回车),textarea 高度超过预留的 116px 后,就会覆盖消息区域,因为消息列表的底部 padding 不会随输入框高度动态调整

    修复方向: 需要让消息区域的 padding-bottom(或 scroll-padding-bottom)根据 composer 的实际高度动态变化,而不是使用固定值。可以通过 ResizeObserver 监听 .composer-shell 的高度变化,实时更新 .messages-panel 的底部内边距。

    此前已有多个 PR 尝试修复相关的溢出/布局问题(如 PR #5635 [3]、PR #8447 [4]、PR #9202 [5]),但固定 padding 与动态 textarea 高度之间的核心矛盾仍然存在。

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about AstrBot with Dosu Add Dosu to your team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:webuiThe bug / feature is about webui(dashboard) of astrbot.bugSomething isn't workingfeature:chatuiThe bug / feature is about astrbot's chatui, webchat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions