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

UseClipboardHandle's write_text is not working properly on Chrome on Mac. #28

Open
b0x-Cub3d opened this issue Apr 5, 2023 · 4 comments

Comments

@b0x-Cub3d
Copy link

I'm using the clipboard handle as an alternative to save files on an application. It seems to work across most browsers when I'm using it to write text to the user's clipboard, with the exception of Chrome on Mac. I checked if it was supported via the is_supported flag, and even have someone explicitly give the Clipboard API permission on the page but it still did not write text to the clipboard. Is there something I'm missing in terms of security issues, or is this a limitation on how the handle is implemented?

@jetli
Copy link
Owner

jetli commented Apr 5, 2023

Is the demo working with your Chrome on Mac? https://jetli.github.io/yew-hooks/#/use_clipboard

@b0x-Cub3d
Copy link
Author

I had someone who has a Mac with Chrome to see if the demo is working in terms of write_text, and it works.
image

@b0x-Cub3d
Copy link
Author

b0x-Cub3d commented Apr 6, 2023

So, I added some of the code from the demo as a means to debug the functionality on our app. The image shows our results, and here's the current implementation using the handle here. Are there any settings I might've missed in terms of web-sys/wasm-bindgen to have this working?

@antonoal
Copy link

In case anyone like me struggle to get clipboard working, please note it works only if your connection is secure (either https or localhost).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants