Skip to content

Conversation

@joshistoast
Copy link
Contributor

Summary

Instead of using the initialFocusRef prop, the Modal component was focusing on the last available Button. This is a workaround that uses tabIndex instead which seems to be working.

Related Issues / Discussions

Closes #8685

QA Instructions

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

instead of using the `initialFocusRef` prop, the `Modal` component was focusing on the last available Button. This is a workaround that uses `tabIndex` instead which seems to be working.

Closes invoke-ai#8685
@github-actions github-actions bot added the frontend PRs that change frontend files label Dec 21, 2025
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

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

Tested. When the modal is first displayed the focus is assigned to the Search History input field, as expected. No code issues identified.

@lstein lstein merged commit e1acb63 into invoke-ai:main Dec 22, 2025
13 checks passed
joshistoast added a commit to joshistoast/InvokeAI that referenced this pull request Dec 23, 2025
…i#8687)

* fix(ui): 🐛 `HotkeysModal` and `SettingsModal` initial focus

instead of using the `initialFocusRef` prop, the `Modal` component was focusing on the last available Button. This is a workaround that uses `tabIndex` instead which seems to be working.

Closes invoke-ai#8685

* style: 🚨 satisfy linter

---------

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Hotkeys and Settings Modals both scroll to bottom immediately

2 participants