[GH-ISSUE #4774] [Bug]: qr-code copy #3312

Closed
opened 2026-10-31 20:31:33 +07:00 by bsakaguchi · 2 comments
Owner

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

  1. Open "Clients"
  2. Press qr-code on any client
  3. Click qr-code to copy and nothing happened

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
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 1. Open "Clients" 2. Press qr-code on any client 3. Click qr-code to copy and nothing happened ### Expected behavior _No response_ ### Actual behavior It works when i press copy button but doesn't when just press qr-code ### Relevant logs ```shell ``` ### 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:31:33 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@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.
  • There's currently no error feedback shown to the user when the image copy fails.

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.tsx around lines 75–85 and 113–125.

<!-- gh-comment-id:4594972640 --> @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. - There's currently no error feedback shown to the user when the image copy fails. **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.tsx` around lines 75–85 and 113–125.
Author
Owner

@MHSanaei commented on GitHub (Jun 1, 2026):

Image
<!-- gh-comment-id:4594977698 --> @MHSanaei commented on GitHub (Jun 1, 2026): <img width="429" height="222" alt="Image" src="https://github.com/user-attachments/assets/fcd4ba09-a43a-4872-812c-aa6cc636822f" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3312
No description provided.