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

Can't copy and paste exp password in html5 #418

Open
Kvel2D opened this issue May 5, 2024 · 4 comments
Open

Can't copy and paste exp password in html5 #418

Kvel2D opened this issue May 5, 2024 · 4 comments
Labels
bug Something isn't working platform: web Issue affects web platform

Comments

@Kvel2D
Copy link
Collaborator

Kvel2D commented May 5, 2024

This issue is not present on native builds.

@Kvel2D Kvel2D added the bug Something isn't working label May 5, 2024
@basxto
Copy link

basxto commented May 6, 2024

On Firefox 124.0.2 (64-bit) on Linux it works for me. I needed to copy the string multiple times for it to work.

I didn’t get middle-click pasting working, that works on native.

On Chromium 123.0.6312.105 I can’t get copy or paste working. Or rather I could only paste what I copied in that page.

It seems browsers generally have some difficulties with copy-paste. https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html#clipboard

Edit: Chromium throws

  • index.js:32871 [Violation] Permissions policy violation: The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://goo.gl/EuHzyv for more details. caused by _godot_js_display_clipboard_set
  • Setting OS clipboard is only possible from an input callback for the Web platform. Exception: DOMException: Failed to execute 'writeText' on 'Clipboard': The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://goo.gl/EuHzyv for more details.

Probably related issue: godotengine/godot#81252

@Kvel2D
Copy link
Collaborator Author

Kvel2D commented May 7, 2024

Thanks for the info! WiIl look into this later but for now I've added a warning message about this issue to exp password menus so players know that they might need to manually type the password.

@basxto
Copy link

basxto commented May 11, 2024

it might be possible to circumvent this with down/uploading a text file or javascript prompts (with default values)

@Kvel2D Kvel2D added the platform: web Issue affects web platform label Jul 7, 2024
@TinyTakinTeller
Copy link

it might be possible to circumvent this with down/uploading a text file or javascript prompts (with default values)

I found that making a custom html/js/css DOM element and then spawning it via JavaScriptBridge.eval is a pretty decent workaround.

See: godotengine/godot#83752 (comment)

@Kvel2D Kvel2D changed the title Can't paste exp password in html5 Can't copy and paste exp password in html5 Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: web Issue affects web platform
Projects
None yet
Development

No branches or pull requests

3 participants