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] 在 loading 状态应该禁止输入回车换行。 #283

Closed
gin-lsl opened this issue Jul 25, 2024 · 2 comments · Fixed by #284
Closed

🐛[BUG] 在 loading 状态应该禁止输入回车换行。 #283

gin-lsl opened this issue Jul 25, 2024 · 2 comments · Fixed by #284
Labels
good first issue Good for newcomers

Comments

@gin-lsl
Copy link
Contributor

gin-lsl commented Jul 25, 2024

🐛 bug 描述

在 loading 状态应该禁止输入回车换行。

📷 复现步骤

https://pro-chat.antdigital.dev/guide/servers-push

在 Loading 状态,不输入任何文本内容,直接输入回车,会换行。这个应该是没有必要的。

🏞 期望结果

💻 复现代码

可复现 demo

© 版本信息

  • @ant-design/pro-chat 版本: [e.g. 1.0.0]
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

@gin-lsl gin-lsl changed the title 🐛[BUG] 🐛[BUG] 在 loading 状态应该禁止输入回车换行。 Jul 25, 2024
@ONLY-yours ONLY-yours added the good first issue Good for newcomers label Jul 25, 2024
@ONLY-yours
Copy link
Collaborator

最近也在思考这个问题,现在是不允许在发送消息了,但是能输入内容

有些时候 SSE 还没结束的,但是用户依然想要编辑内容,可能会出现这种情况

@gin-lsl
Copy link
Contributor Author

gin-lsl commented Jul 25, 2024

消息能输入是对的,不过回车换行(没有按下 Shift)最好能屏蔽掉。

目前是这样的逻辑:

Kapture.2024-07-25.at.17.02.43.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants