Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to copy information to clipboard #25

Open
zoumingzhe opened this issue Jun 21, 2024 · 7 comments
Open

Unable to copy information to clipboard #25

zoumingzhe opened this issue Jun 21, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@zoumingzhe
Copy link

zoumingzhe commented Jun 21, 2024

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

  • dir-browser version: 3.3.0
  • OS: Windows
  • Browser: Chrome

Additional context
Add any other context about the problem here.

@zoumingzhe zoumingzhe added the bug Something isn't working label Jun 21, 2024
@adrianschubek
Copy link
Owner

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

@zoumingzhe
Copy link
Author

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
Copy link
Owner

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

@zoumingzhe
Copy link
Author

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
Copy link
Owner

Does the copy filename or date button work?

@zoumingzhe
Copy link
Author

Does the copy filename or date button work?

Not working at all.

@adrianschubek
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants