Comments (3)
It uses more than one clipboard API, so it should work for more than just Chrome, but Safari is not officially supported, as I am a Windows developer. I would welcome a pull request for support.
from use-clippy.
@CDAracena Which version of Safari was that? use-clippy does work for me in Safari (Version 13.1 ). I am having another issue where I am having a paste prompt when setClipboard
is called, if I select paste then the data is copied to the clipboard.
@CharlesStover I would be interested in submitting a PR, but what are the local testing instructions?
from use-clippy.
There are shamefully no tests. This was a PoC I made for either a Reddit or Twitter user to show how to make a native browser API stateful. It ended up being pretty powerful, so I just published it as-is.
It's kind of difficult to test native browser APIs in a Node test environment, but it should be done nonetheless.
I will close this issue as you have verified that Safari works, which is what I would expect given the different clipboard APIs supported by this hook.
I'd also be willing to help your issue with your paste prompt, but please open another issue so I may tag it as support
instead of a feature request.
What PR are you considering submitting (given Safari is supported)?
from use-clippy.
Related Issues (19)
- [Security] Reading the clipboard is disabled in browsers.
- Have problem on Firefox HOT 3
- Memoize setClipboard
- We don't execute document.execCommand() this time, because it is called recursively. HOT 2
- Copy events do not trigger local state changes in latest version of Chrome. HOT 4
- Get clipboard contents on load? HOT 5
- Reading the clipboard does not work in some versions of Safari. HOT 2
- paste not updating `clipboard` HOT 2
- Deploy a live demo to GH Pages.
- image support? HOT 1
- Only write permissions version HOT 3
- Using clippy across multiple components does not propagate changes to the clipboard of each component
- Write a Medium article for how this was made and/or how to use it.
- modal with useClippy in it scrolls the page HOT 1
- Failed to copy with DOMException document not focused in latest firefox / chrome.
- Disable reading from clipyboard. HOT 1
- Unwanted side effects in Safari HOT 4
- React version dependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-clippy.