mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-05-09 08:25:29 +02:00
[GH-ISSUE #95] Cannot copy voucher code #49
Labels
No labels
bug
enhancement
pull-request
question
question
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/unifi-voucher-site#49
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 @tomdh76 on GitHub (Sep 6, 2025).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/95
Originally assigned to: @glenndehaan on GitHub.
The problem
Thx for this tool!
It works for me quite well except that I cannot copy the voucher code using the copy icon in ios. The print icon works. Also in a web browser the copy icon does nothing. Strangely enough in the home assistant add on I can copy the code, but not in the home assistant add-on on my iphone....
What version of UniFi Voucher Site has the issue?
latest docker image, latest HA version
What was the last working version of UniFi Voucher Site?
No response
What type of installation are you running?
Docker
Anything in the logs that might be useful for us?
Additional information
No response
@glenndehaan commented on GitHub (Sep 8, 2025):
Hi @tomdh76,
Just to avoid confusion, are you using the HA Addon or a Seperate Docker container. Because within the
What type of installation are you running?you selectedDocker.Assuming you are running the HA Addon, are you using the official HA Companion app or are you using a webbrowser like Safari the access the HA instance.
I just tested this on an iPad I had and it seems the copy function works fine on iOS. However I have seen instances where Safari does not allow this due to secure context problems (A problem Apple created). One way around this would be to add the page to your home screen. This would create it's own context and should bypass this issue or utilize the official app.
Kind regards,
Glenn de Haan
@tomdh76 commented on GitHub (Sep 8, 2025):
I think I found the problem:
I use both the docker and the HA addon. When going to the website of the docker (192.168.20.40:3001/voucher) image in edge browser for example I can use the print icon, but not the copy icon. When going to the website of home assistant using https of my domain (xxx.com) in the addon I can use the copy icon. But when going to the website of my home assistant addon using local ip (192.168.20.42:8123) the copy icon does not work. So it is probably indeed some security issue when using http://localip....
@glenndehaan commented on GitHub (Sep 8, 2025):
Yeah that is indeed correct the Clipboard API needs a secure connection to work.
Will implement a check soon that should hide the icon when the API is unavailable.
@glenndehaan commented on GitHub (Sep 8, 2025):
I have just released version 8.1.1 this will hide the
copy to clipboardbuttons if the browser API is unavailable