Skip to content

chore(ext): rm keydown event on history#321

Merged
gaomeng1900 merged 1 commit intomainfrom
chore/ext-rm-keydown
Mar 20, 2026
Merged

chore(ext): rm keydown event on history#321
gaomeng1900 merged 1 commit intomainfrom
chore/ext-rm-keydown

Conversation

@gaomeng1900
Copy link
Collaborator

What

ATT

Type

  • Bug fix
  • Feature / Improvement
  • Refactor
  • Documentation
  • Website
  • Demo / Testing
  • Breaking change

Requirements / 要求

  • I have read and follow the Code of Conduct and Contributing Guide . / 我已阅读并遵守行为准则。
  • This PR is NOT generated by a bot or AI agent acting autonomously. I have authored or meaningfully reviewed every change. / 此 PR 不是由 bot 或 AI 自主生成的,我已亲自编写或充分审查了每一处变更。

Copilot AI review requested due to automatic review settings March 20, 2026 09:14
@gaomeng1900 gaomeng1900 merged commit 50ce56a into main Mar 20, 2026
4 checks passed
@gaomeng1900 gaomeng1900 deleted the chore/ext-rm-keydown branch March 20, 2026 09:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the keyboard keydown handler from the History list item interaction.

Changes:

  • Removed onKeyDown handling for Enter/Space activation on history items.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -98,12 +98,6 @@ export function HistoryList({
role="button"
tabIndex={0}
onClick={() => onSelect(session.id)}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the onKeyDown handler breaks keyboard activation for an element using role=\"button\" + tabIndex={0} (Enter/Space will no longer trigger selection). To keep this accessible, either restore the Enter/Space key handling, or change the element to a semantic <button type=\"button\"> (and then you can drop role/tabIndex and rely on native keyboard behavior).

Suggested change
onClick={() => onSelect(session.id)}
onClick={() => onSelect(session.id)}
onKeyDown={(event) => {
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault()
onSelect(session.id)
}
}}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants