mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4774] [Bug]: qr-code copy #3312
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @UnBelievable69 on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4774
Describe the bug
When i press qr-code it doesn't copy link
How to reproduce the problem
Expected behavior
No response
Actual behavior
It works when i press copy button but doesn't when just press qr-code
Relevant logs
Screenshots
No response
3x-ui version
3.2.5
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Frontend (UI / panel pages)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
Yes — Caddy
Before submitting
@github-actions[bot] commented on GitHub (Jun 1, 2026):
Thanks for the report!
What's happening under the hood:
Clicking the QR code image is designed to copy the QR image to your clipboard (not the link text). Internally it calls
navigator.clipboard.write()with a PNG blob. If that fails (which it commonly does due to browser permissions or certain configurations), it silently falls back to a file download — with no visible error or confirmation shown to you. So it may appear as if nothing happened.The Copy button (📋 icon) in the header copies the link text, which is why that one works for you.
Likely root cause:
navigator.clipboard.write()for images requires the page to be focused and may require explicit clipboard-write permission in some browsers (Firefox, hardened Chrome profiles, etc.). The fallback to download may also be blocked or go unnoticed.Workaround for now:
Use the Copy button (📋 icon) next to the link tag to copy the link. This copies the text link reliably.
For contributors: The fix should add a visible error/info message when the image clipboard write fails (instead of silently falling back), and clarify the tooltip so users understand clicking the QR copies the image, while the button copies the link. See
frontend/src/pages/inbounds/qr/QrPanel.tsxaround lines 75–85 and 113–125.@MHSanaei commented on GitHub (Jun 1, 2026):