Open Kvel2D opened 6 months ago
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: https://github.com/godotengine/godot/issues/81252
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.
it might be possible to circumvent this with down/uploading a text file or javascript prompts (with default values)
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: https://github.com/godotengine/godot/issues/83752#issuecomment-2322229670
This issue is not present on native builds.