Assistant: PageUp and Home in a text field scroll the transcript

未关闭 适合新手
#563 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
html, javascript
领域
frontend

调研方向

从 capsules/assistant/browser/agent-stream.js 中的关键保护条件和 scripts/fixtures/assistant-follow-input.html 中的真实输入矩阵开始。在文本字段获得焦点时重现 PageUp 和 Home,然后检查 Chromium 和 WebKit 中的消息按钮用例。完成标准是:文本字段中的按键不会滚动消息记录,并且矩阵中的两项预期与报告的行为一致。

由索引模型根据 Issue 内容生成。

描述

In Assistant, PageUp or Home pressed while typing in a text field (input, textarea, select or [contenteditable]) scrolls the whole transcript, even when the field itself has nothing to scroll. Same on develop (30b166b05) and on the Jump to latest fix branch, in Chromium and in system WebKit (Safari 26.6.2).

Measured with real key events (Grok review of fix/assistant-jump-flash at 0f7ac56f4, report /private/tmp/cursor-runs/review-jump-flash-r10.report.md, section "Shared cases to file"): Chromium PageUp leaves the transcript at top 1820 (380 px from the end), WebKit at top 1840, Home goes to top 0. The key guard in capsules/assistant/browser/agent-stream.js returns for these targets but does not stop the key, so the browser scrolls the nearest scrollable ancestor, the transcript.

Expected: keys typed inside a text field act on that field only. The transcript moves only for keys aimed at it (focus on the transcript, a message button, or the page body).

Follow behaviour after that scroll is correct and is not part of this issue: the reader really moved, so follow turns off and a growing reply does not pull them back.

When fixing, also correct two expectations in the real-input matrix (scripts/fixtures/assistant-follow-input.html) that the review found wrong: Shift+Space on a message button and WebKit ArrowUp on a message button do not scroll, so they should expect follow to stay on, not a scroll away.

主要语言
Rust
星标
6
派生
2
平均合并
1 天 3 小时
30 天内合并 PR
42

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

elastos/elastos-runtime 的其他 Issue

查看 elastos/elastos-runtime 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。