adrianschubek / dir-browser

Directory Browser - Browse your files and folders on the web. Easy Docker setup.
https://dir.adriansoftware.de
MIT License
13 stars 4 forks source link

Unable to copy information to clipboard #25

Open zoumingzhe opened 5 months ago

zoumingzhe commented 5 months ago

Describe the bug The API link in the dropdown menu can be opened. But the other buttons don't seem to work.

To Reproduce Steps to reproduce the behavior:

  1. Click on the dropdown menu
  2. Click the Hash button

Expected behavior Hash information is copied to the clipboard.

Screenshots image

Environment

Additional context Add any other context about the problem here.

adrianschubek commented 5 months ago

Did you click on a folder? Because hashes can only be calculated for files at this time. image

zoumingzhe commented 5 months ago

Did you click on a folder? Because hashes can only be calculated for files at this time. image

I click a file, the hash cannot click on folder.

adrianschubek commented 5 months ago

That's strange. It works for me. copyhash1 Do you see an error in the devtools?

zoumingzhe commented 5 months ago

That's strange. It works for me. copyhash1 copyhash1 Do you see an error in the devtools?

No any errors, I can click the button, but no any value can be pasted.

adrianschubek commented 5 months ago

Does the copy filename or date button work?

zoumingzhe commented 4 weeks ago

Does the copy filename or date button work?

Not working at all.

adrianschubek commented 3 weeks ago

I can reproduce it when deploying it on an insecure http site: Uncaught TypeError: navigator.clipboard is undefined. Seems to work in secure context (https or localhost) only. https://github.com/adrianschubek/dir-browser/blob/main/src/index.php#L849-L852 https://stackoverflow.com/questions/51805395/navigator-clipboard-is-undefined I'll try to find a workaround