api.Clipboard.readText - known not to work in Android webview
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
What type of issue is this?
Incorrect support data (example: BrowserX says "86" but support was added in "40")
What information was incorrect, unhelpful, or incomplete?
Basically there is a known issue with using the clipboard API in a hybrid app in Android. There are many workarounds, usually involving exposing a clipboard object using the native addJavascriptInterface API, and exposing the Java clipboard functionality that way.
What browsers does this problem apply to, if applicable?
Chromium (Chrome, Edge 79+, Opera, Samsung Internet)
What did you expect to see?
The documentation should reflect the current situation i.e., the javascript clipboard API doesn't work in hybrid apps on Android
Did you test this? If so, how?
Yes I have tested it in my hybrid app.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
https://stackoverflow.com/questions/73863737/clipboard-readtext-not-working-in-android-webview
https://stackoverflow.com/questions/61429649/copy-to-clipboard-using-navigator-clipboard-writetext-not-working-in-android-web
https://stackoverflow.com/questions/61243646/clipboard-api-call-throws-notallowederror-without-invoking-onpermissionrequest
These are some examples of people with this issue
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard
MDN metadata
MDN page report details
- Query:
api.Navigator.clipboard - Report started: 2023-10-03T00:18:36.946Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MDN Navigator.clipboard page and review the linked Android WebView reports to confirm the limitation described. Update the relevant browser-compatibility data so Android hybrid-app support reflects the reported behavior, then verify the resulting MDN compatibility display.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- documentation, mobile
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100