Comments (3)
This should be resolved in 1.0.4, where it will now fail silently if readText is not supported. Even TypeScript's clipboard interface does not correctly identify that readText is optional. 😵
Thank you so much for the report!
from use-clippy.
Thanks for the report! That is an interesting error. For documentation's sake, Mozilla's definition of the Clipboard API explicitly defines navigator.clipboard.readText.
Can you share the following by manually executing it in your Firefox console?
console.log(navigator.clipboard);
from use-clippy.
@CharlesStover I don't trust their documentation.
Here is the screenshot, I can not copy the object, it always gives me an empty object.
Btw, the readText
is not there.
console.log(typeof navigator.clipboard.readText)
>> undefined
For example, in here they stated that the permission query options available, but in reality, if you call navigator.permissions.query({ name: "clipboard-read" })
it will throw an exception.
from use-clippy.
Related Issues (20)
- [Security] Reading the clipboard is disabled in browsers.
- 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
- Safari support HOT 3
- 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
- Input looses focus 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.