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

love.system.setClipboardText silently fails #52

Open
yumaikas opened this issue Feb 19, 2022 · 3 comments
Open

love.system.setClipboardText silently fails #52

yumaikas opened this issue Feb 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@yumaikas
Copy link

I'm building a vector/line editor, and one of bits of functionality involved is setting the clipboard with the current contents of the given scene, and this doesn't work. I know that browser clipboards can be a bit fiddly, though this should work since it's user-initiated.

I'm willing to help sort this out, provided it is in scope.

@Davidobot Davidobot added the bug Something isn't working label Jun 9, 2022
@Davidobot
Copy link
Owner

A workaround would be to use the API player and call JS from within lua: pthom/hello_imgui#3 (comment)

The better approach would be for me to bake this into the code

@ParticleG
Copy link

A workaround would be to use the API player and call JS from within lua: pthom/hello_imgui#3 (comment)

The better approach would be for me to bake this into the code

Could you please try using navigator.window.navigator.clipboard.readText() and window.navigator.clipboard.writeText("tetet") ?
This approach won't need a pseudo HTML element, only request current document to be focused, which in most case is true

@ParticleG
Copy link

Current clipboard acts like a sanbox, the love engine could set and get from clipboard, but JS couldn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants