TachibanaGeneralLaboratories / download-navi

Free and Open Source software download manager
GNU General Public License v3.0
812 stars 86 forks source link

[Browser] Writing to clipboard from JavaScript doesn't work #216

Closed Kita2345 closed 2 years ago

Kita2345 commented 2 years ago

Describe the bug

Copy to clipboard option on any website that uses JavaScript's navigator.clipboard.writeText doesn't work.

How to Reproduce

Case 1: GitHub page

  1. Go to https://github.com/Akianonymus/gdrive-downloader#basic-method and https://github.com/bezzad/Downloader#how-to-use on Navi Browser
  2. Use the copy button to copy the code block
  3. Doesn't respond as Copied and the text is also not copied

Case 2: website

  1. Go to https://compro-prasad.gitlab.io
  2. Use the # symbol beside any of the headers
  3. Copied message is shown but the link doesn't get copied

Expected behavior

In any of the cases the link should get copied. I have stated the cases in the How to reproduce section.

proninyaroslav commented 2 years ago

Similar to https://github.com/quasarframework/quasar/issues/6566, I will check it.

proninyaroslav commented 2 years ago

JavaScript Clipboard API's writeText method docs says, that we need to obtain clipboard-write permission using Permissions API but Android WebView doesn't implement this permission: https://chromium.googlesource.com/chromium/src/+/refs/heads/master/android_webview/browser/aw_permission_manager.cc#332. Unfortunately, this is not a bug, just the WebView behaviour.