-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Clipboard not working #235
Comments
Seems like this is an issue in Android, the copy/paste buttons cannot be clicked. For now we have fixed it with html/css injection. ClipboardHack.dart
clipboardhack.js (put in assets folder)
|
same problem here. |
@ jdelrue your code helped me a lot. same problem here |
same problem here. |
thank you so mmmmmmmmmmmmmuch! helped me a lot |
In some compilations it shows the hacky menu and in others it doens't (with exact same code). Does someone know how to explain this strange behavior? In fact I had to ditch the ClipboardHack.dart and did the following (I don't need paste function): |
In case anyone is interested, after 7 days I've managed to solve the behavior described. Method addClipboardHack MUST be called in webviews's onLoadStop event, as exemplified here by the plugin author: https://stackoverflow.com/a/59125391/854257 |
Clipboard is somehow broken on Android, probably because on how Flutter manages native views inside its widgets tree. |
Thank you @pichillilorenzo for your hard work. Best for you all in Italy. |
Thanks for your support! 👍 |
Is there any plan for fixing this issue? |
@mankeomorakort yes, I'm working on it. I found a workaround to fix it using native components and a little bit of JavaScript (so, to make it work properly, JavaScript must be enabled!). It should be available in the next release. Maybe today or tomorrow 👍 |
Published new version |
@pichillilorenzo Thank a lot :) does it work with copy and paste feature? |
One better solution that I found that doesn't block other injections and is simple is this. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue. |
Environment
Flutter version: 1.12.13+hotfix.5
Plugin version: 9c7ac0d
Android version: 8.1.0
iOS version:
Xcode version:
Device information: Xaomi Redmi 6
Description
Cannot copy or paste from within webview
Expected behavior:
Copy and paste from clipboard working
Current behavior:
Copy and paste from clipboard not working
The text was updated successfully, but these errors were encountered: