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

api.Clipboard.readText - known not to work in Android webview #20867

Open
gwynjudd opened this issue Oct 3, 2023 · 0 comments
Open

api.Clipboard.readText - known not to work in Android webview #20867

gwynjudd opened this issue Oct 3, 2023 · 0 comments
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@gwynjudd
Copy link

gwynjudd commented Oct 3, 2023

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
@queengooborg queengooborg added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Oct 3, 2023
@queengooborg queengooborg changed the title api.Navigator.clipboard - clipboard.readText is known not to work in Android webview api.Clipboard.readText - known not to work in Android webview Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

No branches or pull requests

3 participants
@gwynjudd @queengooborg and others