fix: 修复聊天预览滚动抽搐与键盘事件类型
任务: 解决问答预览页滚动抽搐并补齐类型检查报错\n\n- 在 chat 组件中改为自定义回到底部按钮,避免内置按钮导致滚动抖动\n- 统一收口流式结束状态,结束时关闭 typing/loading\n- 修复 FaqEditDialog 的 keydown 参数类型,兼容 Event | KeyboardEvent
This commit is contained in:
@@ -101,8 +101,12 @@ const focusAnswerEditor = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleQuestionKeydown = (event: KeyboardEvent) => {
|
||||
if (event.key === 'Tab' && !event.shiftKey) {
|
||||
const handleQuestionKeydown = (event: Event | KeyboardEvent) => {
|
||||
if (
|
||||
event instanceof KeyboardEvent &&
|
||||
event.key === 'Tab' &&
|
||||
!event.shiftKey
|
||||
) {
|
||||
event.preventDefault();
|
||||
focusAnswerEditor();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user