Clipboard doesn't work in a webview
Sunvas opened this issue · 0 comments
Sunvas commented
Current/Missing Behavior
navigator.clipboard.writeText
doesn't work in webviews. See how to reproduce section for demo.
Expected/Proposed Behavior
It should work
Additional Info
- Operating System: any
- NW.js Version: 0.85
- Code snippet: included
How to reproduce
package.json
{
"main": "/main.html",
"name": "demo"
}
main.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Demo</title>
</head>
<body style="width:100vw;height:100vh">
<h2>Clipboard doesn't work in webviews:</h2>
<webview style="width:100%;height:100%" src="https://www.w3schools.com/howto/howto_js_copy_clipboard.asp"></webview>
</body>
</html>
Demo opens page with live demostraion of "Copy Text to Clipboard" which perfectly works in browser, but doesn't work in webviews.