Skip to content

Keep the clipboard fallback within a modal's focus boundary. - #1564

Merged
WaylandYang merged 2 commits into
deeplethe:devfrom
virtue039:fix/clipboard-fallback-inside-dialog
Dec 1, 2026
Merged

WaylandYang merged 2 commits into
deeplethe:devfrom
virtue039:fix/clipboard-fallback-inside-dialog

Conversation

@virtue039

Copy link
Copy Markdown
Contributor

Why

On plain HTTP, the clipboard fallback placed its temporary textarea outside the active modal. The modal could pull focus back before the text was selected.

What changes

Mount the textarea inside the active native dialog or ARIA dialog when one owns focus, then remove it and restore focus.

How it was checked

The clipboard regression simulates a modal focus trap and verifies copying, textarea cleanup, and focus restoration. The final revision also includes the native dialog selector.

  • Commit 11b07c4 on macOS arm64, based on dev at 87a83b9.
  • Passed cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings.
  • Cargo workspace tests passed (1870 tests), with a dedicated PostgreSQL 16.15 database, pgvector, and Poppler enabled.
  • pnpm test passed (357 tests). The benchmark helper suite passed (15 tests).
  • pnpm exec tsc --noEmit passed after the review follow-up.
  • pnpm build passed, including type checking.
  • Rechecked the branch as a clean merge into current dev at 2614d99. The combined integration checkout passed Rust formatting, Clippy, the Rust workspace suite (1877 passed, 6 ignored), pnpm test (376 passed), TypeScript, the production build, and benchmark helper tests (15 passed). The first Rust workspace run hit a Tantivy lock in an unchanged search-recovery test. The full retry passed with four test threads.

Before review

  • The commit is signed off under the DCO.

Signed-off-by: Virtue039 <77153652+virtue039@users.noreply.github.com>

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, mounting the fallback inside the closest dialog is the minimal fix. Merging.

@WaylandYang
WaylandYang merged commit e7a3f23 into deeplethe:dev Dec 1, 2026
6 checks 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.

2 participants