Skip to content

fix: make clipboard fallback dialog-safe - #11

Merged
chen-ran merged 3 commits into
mainfrom
codex/clipboard-focus-trap-fallback
Jul 30, 2026
Merged

fix: make clipboard fallback dialog-safe#11
chen-ran merged 3 commits into
mainfrom
codex/clipboard-focus-trap-fallback

Conversation

@chen-ran

@chen-ran chen-ran commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

  • keep the legacy clipboard fallback inside an active dialog or alert dialog so focus traps do not steal its selection
  • restore focus and remove the temporary textarea after copying

Why

The existing fallback mounts its temporary textarea under document.body. In a focus-trapped dialog, focus is immediately redirected back into the dialog, so copying can fail over plain HTTP when navigator.clipboard is unavailable.

Verification

  • UI type check passes
  • production build passes
  • ESLint passes
  • UI contract guard passes

@chen-ran
chen-ran marked this pull request as ready for review July 30, 2026 10:41
@chen-ran
chen-ran requested a review from a team as a code owner July 30, 2026 10:41
@chen-ran
chen-ran merged commit bf255c0 into main Jul 30, 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