TodePond / CellPond

surreal cellular automata
https://cellpond.cool
MIT License
279 stars 35 forks source link

Prevent paste processing on middle click #305

Closed 5ucur closed 1 year ago

5ucur commented 1 year ago

This will prevent processing the paste if the middle click is clicked. It doesn't outright remove the pasting functionality, but pressing Ctrl + V or Cmd + V accidentally is more difficult anyway.

With this change, the site doesn't error out on middle-clicking on Linux - the only thing that happens is that, if the click is in the field, a dot gets placed.

Fixes #304. Tested on the affected system.

netlify[bot] commented 1 year ago

Deploy Preview for keen-boyd-1443aa ready!

Name Link
Latest commit 1c2b24255225641c83cd3283506c6a1a3a35e37a
Latest deploy log https://app.netlify.com/sites/keen-boyd-1443aa/deploys/6499af67c8da3b000828ddc0
Deploy Preview https://deploy-preview-305--keen-boyd-1443aa.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

TodePond commented 1 year ago

Nice, thanks! and I commend you for diving through the depths 🫡

5ucur commented 1 year ago

It only occurred to me now that perhaps, not clearing the current ruleset until the pasted one is confirmed to really be a ruleset, might be a better solution than my workaround. If I get time, I'll see if I can get it working that way.