Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 在多条长对话中编辑历史对话(非最后一条)时,会直接跳到回答底部(或更下面的位置)。此时需要向上翻才能找到编辑的内容 #4494

Open
one-pyy opened this issue Oct 26, 2024 · 3 comments
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃

Comments

@one-pyy
Copy link

one-pyy commented Oct 26, 2024

📦 部署环境

Docker

📌 软件版本

1.24.1(服务器版本)

💻 系统环境

Ubuntu

🌐 浏览器

Edge

🐛 问题描述

在多条长对话中编辑历史对话(非最后一条)时,会直接跳到回答底部。此时需要向上翻才能找到编辑的内容。推测是因为总是使用到顶部的距离,而编辑时会限制文本框高度,导致要编辑的内容变矮,而此时与顶端高度相同的地方就变成了底部(或更下面的位置)

📷 复现步骤

打开一个会话,添加两条消息,每条消息"test\n"*200。然后点击编辑第一条消息,即可复现。

🚦 期望结果

每次打开编辑都会定位到输入框顶部

📝 补充信息

或许可以参考下面的修改方法?

  • 每次打开编辑都定位到上一条消息底部
  • 编辑按钮在单条消息顶部,这样就可以避免这个问题
  • 能设置编辑框不折叠高度(最好编辑按钮是悬浮的,这样可以翻到哪里修改到哪里
  • 菜单栏有一个编辑按钮,按下后所有消息都可以直接编辑

感谢大佬们!

@one-pyy one-pyy added the 🐛 Bug Something isn't working | 缺陷 label Oct 26, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Oct 26, 2024
@lobehubbot
Copy link
Member

👀 @one-pyy

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📌 Software version

1.24.1 (server version)

💻 System environment

Ubuntu

🌐 Browser

Edge

🐛 Problem description

When editing a historical conversation (not the last one) in multiple long conversations, you will jump directly to the bottom of the answer. At this time, you need to scroll up to find the edited content. It is speculated that the distance to the top is always used, and the height of the text box is limited when editing, causing the content to be edited to become shorter, and the place with the same height as the top becomes the bottom (or lower).

📷 Steps to reproduce

Open a session and add two messages, each message "test\n"*200. Then click to edit the first message to reproduce.

🚦 Expected results

The edit button is at the top of the single message so this problem can be avoided/

Ability to set the non-folding height of the edit box (it is best if the edit button is suspended so that you can turn it to where it is and modify it)/

There is an edit button in the menu bar. After pressing it, all messages can be edited directly.

📝 Supplementary information

Thanks guys!

Copy link

dosubot bot commented Oct 26, 2024

The issue you're experiencing seems to be related to the scrolling behavior when editing a message in a long conversation. When you edit a message that is not the last one, the interface jumps to the bottom, making it difficult to find the content you want to edit. This might be due to the way the height of the text box is controlled during editing, which can affect the scrolling position.

Currently, the height of the text box is controlled by the DraggablePanel component, which has defined minimum and maximum heights. This could be causing the issue where the content appears to jump to the bottom when editing [1].

To address this, you might consider implementing a mechanism to keep the edit button visible or floating while scrolling, which would allow you to edit messages more conveniently. However, there is no existing functionality or component in the repository that provides this feature [2].

For a more immediate solution, you could explore adjusting the CSS or JavaScript logic to ensure the editing interface maintains its position relative to the message being edited, rather than jumping to the bottom. This might involve modifying the event listeners or handlers associated with message editing to better manage scrolling and positioning [3].

To continue talking to Dosu, mention @dosu.

@lobehubbot lobehubbot added the Inactive No response in 30 days | 超过 30 天未活跃 label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants