jasmeen
December 30, 2024, 10:51am
1
Godot Version
v4.3.stable.official [77dcf97d8]
Question
telegram mini app block clipboard api in web export below is my code
var clipboard_text = str(DisplayServer.clipboard_get())
inputWallet.text = clipboard_text
this works fine in mobile browser but when I open in telegram then it did not work
I don’t think Telegram is able to access a users clipboard directly like that, and I think different browsers allow/disallow depending on security settings which you may or may not be able to change. Godot can’t do anything about that. Does the Telegram mini app have any API calls that read the clip board for you? Try using those.
For instance a quick search:
opened 04:38AM - 29 Jan 22 UTC
closed 01:50AM - 12 Feb 22 UTC
archived
platform:web
topic:porting
### Godot version
3.4.2
### System information
linux ubuntu 21.04 lts
### Is… sue description
I saw this problem here #12587 and it shows as closed, but it's happening again.
System clipboard contents cannot be pasted in controls such as LineEdit. The game has its own clipboard contents and it is not shared with the system.
OS.get_clipboard() stays empty unless we copy text from the game itself. Only HTML5
### Steps to reproduce
Make a scene with a LineEdit.
Export it to HTML5
Run it in a browser
Copy text from any source but the game (eg: the URL bar of the browser)
Try to paste it in the LineEdit.
### Minimal reproduction project
_No response_