hcengineering / hcengineering/platform
Button copy URL to clipboard don't work, function copyTextToClipboard throw error
- Dominant language
- TypeScript
- Stars
- 27.7k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Description of the issue
When I press the button "Copy document URL to clipboard" in documents or "Copy issue URL to clipboard" in issues copied nothing.
### Your environment
* v0.6.377 (deployed self-hosted)
* Google Chrome 131.0.6778.139
* Windows 11 26100.2605
### Steps to reproduce
Create a document or issue, go into it, and click the button to copy the link to the clipboard.
### Expected behaviour
Link should copy.
### Actual behaviour
Nothing happens on the screen, an error appears in the console (Cannot read properties of undefined (reading 'writeText')).
When debugging in the browser I see that navigator don't have clipboard, what causes this error.

Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the copyTextToClipboard function and the document and issue URL copy buttons, then reproduce the problem in Chrome using the steps in the issue. Trace why navigator.clipboard is unavailable; done means both buttons copy the link successfully without a console error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100