Skip to content

Fix search modal focus restoration and refresh build configuration - #66

Merged
ruibaby merged 2 commits into
mainfrom
fix/restore-search-modal-focus
Oct 8, 2026
Merged

ruibaby merged 2 commits into
mainfrom
fix/restore-search-modal-focus

Conversation

@ruibaby

@ruibaby ruibaby commented Oct 8, 2026

Copy link
Copy Markdown
Member

Closing the search modal with Escape or a backdrop click leaves keyboard focus on the document body. Restore focus to the element that opened it after the modal DOM updates, including triggers inside open shadow roots. Ignore Escape while the modal is closed.

To reproduce, focus a search trigger, press Enter to open the modal, then press Escape. Before this fix, focus moves to BODY; afterward, it returns to the trigger. Backdrop dismissal follows the same behavior.

Add Vitest Browser Mode tests using Playwright Chromium, covering repeated openings, multiple triggers, batched close/reopen, unavailable triggers, and same-document result navigation.

Update the plugin platform dependency from 2.17.0-SNAPSHOT to 2.20.11 and simplify Gradle repositories to Maven Central and Gradle Plugin Portal.

Validation:

  • All 11 browser tests passed with pnpm test.
  • The Escape regression test fails against the original implementation.
  • TypeScript, Biome, frontend build, and diff checks passed.
  • ./gradlew build --no-daemon --max-workers=1 passed with Java 17. There are no Java test sources.
  • The Java 21 build failed during Java compilation with NoSuchFieldError: JCTree$JCImport.qualid; Java 21 compatibility is not addressed by this PR.

Fixes #65

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T08:49:42.674694Z e6b3c76 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ruibaby
ruibaby merged commit 81f4ea6 into main Oct 8, 2026
1 check passed
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.

搜索弹窗关闭后未将键盘焦点恢复到触发元素

1 participant