-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Copy API-Key button not working #1675
Comments
Can you try another browser ? |
Looks like you need to be on |
It seems this API is only available for https, and i suppose localhost. Not sure how to take this forward. It seems there's hacks to use a hidden textarea to copy text, or i could just remove the copy button if the clipboard API is not available. WDYT? |
I would just remove the button if the API is not supported. A user can just copy it by hand; not like they have to do that often |
@gotson I use this code to copy values from a webpage to the clipboard: function copyToClipboard() {
/* Get the text field */
var copyText = document.getElementById("coords");
/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */
/* Copy the text inside the text field */
document.execCommand("copy");
/* Alert the copied text */
//alert("Copied the text: " + copyText.value);
} It's independent of the OS, browser & it works on both http and https. |
i don't really want to add that kind of workaround code if possible |
🎉 This issue has been resolved in |
Steps to reproduce
Expected behavior
Key gets copied to clipboard
Actual behavior
Nothing happens and the browser console throws an error:
TypeError: navigator.clipboard is undefined copyApiKeyToClipboard ApiKeyAddDialog.vue:90 VueJS 4 click VBtn.js:134 VueJS 3 vue.runtime.esm.js:3049:16
Logs
No response
Komga version
v1.12.0-master
Operating system
Firefox on Windows 11
Installation method
Docker
Other details
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: