Closed tversteeg closed 1 month ago
I downloaded Floorp and opened https://leptos-use.rs/browser/use_clipboard.html and everything works just as well as in Firefox, my usual browser.
Please note that the demo doesn't have read
enabled so it only updates when you click the "Copy" button.
Ah right, so maybe the bug is not related to the demo but specifically to read
being enabled?
When I run the demo I see the following screen even when I copy something:
I never get a prompt, also not when I press the copy button, but that works fine. When I run it locally, I see the same pattern, but when I copy any text on the page I see the following error in the console (I don't see anything in the console for the demo):
I'm using Floorp 11.13.3 which is based on Firefox 115.12.0.
I've created a simple helper struct that I pass around with
use_context
to show you how I access the API:Helper script
`src/clipboard.rs`: ```rust //! Global clipboard state. use leptos::{Signal, SignalGetUntracked}; use leptos_use::{PermissionState, UseClipboardOptions, UseClipboardReturn}; /// Clipboard state meant to be passed in context. #[derive(Clone)] pub struct Clipboard { /// Whether we have permission. pub permission: Signal