Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard doesn't work in a webview #8170

Open
Sunvas opened this issue Mar 6, 2024 · 0 comments
Open

Clipboard doesn't work in a webview #8170

Sunvas opened this issue Mar 6, 2024 · 0 comments

Comments

@Sunvas
Copy link

Sunvas commented Mar 6, 2024

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

</body> </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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant