Skip to content

Handle clipboard failures with manual copying - #51

Merged
Gabriel Mongefranco (gabrielmongefranco) merged 1 commit into
DepressionCenter:mainfrom
NehonaYa:fix/clipboard-fallback-22
Oct 27, 2026
Merged

Gabriel Mongefranco (gabrielmongefranco) merged 1 commit into
DepressionCenter:mainfrom
NehonaYa:fix/clipboard-fallback-22

Conversation

@NehonaYa

Copy link
Copy Markdown
Contributor

When clipboard access is unavailable or denied, copying a report or link fails without giving the user a way to recover. Show the text in a read-only dialog so it can be copied manually, and report success only after the browser completes the copy.

The same fallback is used by the report, published URL, data source URL, and widget SQL copy actions. The dialog selects the text, keeps keyboard focus inside, and clears the text on close.

Fixes #22

Validation:

  • Ran the repository checks and all 15 Node tests.
  • Built the three application outputs in an isolated Windows workspace using esbuild 0.28.0 and checked the generated JavaScript syntax.
  • In Microsoft Edge, checked unavailable and denied clipboard access, focus and Escape behavior, a 320px viewport, and that markup in the copied text is not executed.
  • An axe-core scan of the dialog reported no violations; two color contrast checks need manual review. A screen reader pass has not been performed.

@gabrielmongefranco

Copy link
Copy Markdown
Contributor

Thank you, NehonaYa ! I'll go ahead and merge this.

@gabrielmongefranco
Gabriel Mongefranco (gabrielmongefranco) merged commit 7448e7b into DepressionCenter:main Oct 27, 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.

Show a useful fallback when copying to the clipboard fails

2 participants