itchio / itch.io

:bug: Public itch.io issues tracker and documentation - use support instead for private information!
https://itch.io/support
240 stars 25 forks source link

Clipboard functionality for HTML5, in-browser projects broken, blocked or missing on the itch.io platform #1354

Open all4martini opened 2 years ago

all4martini commented 2 years ago

Hello! I'm developing a little art tool that I've published to itch.io. I'd like to make use of copy/pasting for things like importing colors. The project is built in the latest version of GameMaker & exported to HTML5. Once tested in HTML5-form using GameMaker itself, the clipboard works just fine, but once it's been uploaded to itch.io - the clipboard functionalities don't work. I'm not sure if there's a permission I'm not being granted, or if something's broken. But I'd love for this to be resolved.

This is my project I'm referring to. https://gmsm.itch.io/nacho

leafo commented 2 years ago

Generally, for security reasons, I would recommend having your UI present a field for the user to copy/paste into directly, instead of trying to manipulate the clipboard directly via JavaScript.

dudasaus commented 9 months ago

My web game uses the clipboard to share images of game scores, it's a fun feature to have. Understanding the clipboard hijacking risk, perhaps itch could prompt the user with a notice of clipboard permissions (on applicable games) with an option to clear their clipboard on game launch?