Faulty behaviour when browser access is not permitted.
See original GitHub issueHello,
This is a bit of an edge-case and might not have a proper solution. But since the project supports IE9+ and I’d qualify this as a “case where you’d like to show some user feedback”.
I thought I’d be worth mentioning here.
Steps to reproduce:
- Visit http://zenorocha.github.io/clipboard.js/
- Click one of the triggers in the examples
- Click on deny access, when prompted for clipboard permissions by the browser. (see screenshot)
- UI responds as if the copy to clipboard succeeded. (see screenshot)
AFAIK the root cause of the problem is that document.execCommand returns true even if it does not have permissions.
- OS: Windows 7 (Home Premium)
- Browser Version: IE 9 (see screenshot)

Thanks for a great library with superb documentation. Cheers.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Handling common HTML and CSS problems - MDN Web Docs
Browsers not supporting modern features. This is a common problem, especially when you need to support old browsers (such as Internet Explorer) ...
Read more >403 Forbidden Error - What Is It and How to Fix It
The 403 Forbidden error happens when a web server denies access to a webpage to a user trying to access it trough a...
Read more >Access denied when you call Web Service
This article helps you resolve errors (Access Denied) that occur when you call a Web service application and Anonymous access authentication ...
Read more >Upcoming Browser Behavior Changes: What Developers ...
Learn about upcoming changes to browser cookie behavior that may make your web applications incompatible.
Read more >Troubleshooting Chrome Web Store violations
Extensions with broken functionality—such as dead sites or non-functioning features—are not allowed. # Excessive permissions. Corresponds to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The following error trap is working for me on IE11 inside my
successhandler因为之前可能已经有复制内容,会导致误判,所以我加了剪切板的内容对比,这样可能会比较完整: