zenorocha / clipboard.js

:scissors: Modern copy to clipboard. No Flash. Just 3kb gzipped :clipboard:
https://clipboardjs.com
MIT License
34.03k stars 3.98k forks source link

Event action is now a function not a string #792

Closed pythonandchips closed 2 years ago

pythonandchips commented 2 years ago

🐛 Bug Report

Event action parameter used to return a string but now returns a function. The JSFiddle below demonstrates the change.

JSFiddle

Expected Behaviour

From the JSFiddle above expect e.action to equal "copy"

Actual Behaviour

Instead of e.action being a string a function is returned

To Reproduce

On JSFiddle click copy button. Check console, expected string to be logged but is function.

Browsers Affected

All

Operational System

MacOS, Windows, Linux

obetomuniz commented 2 years ago

Thanks for report this bug @pythonandchips. I was able to reproduce on my side the same. I'll push a fix today or tomorrow for it.

obetomuniz commented 2 years ago

Hey @pythonandchips, now you can check on this JSFiddle the Event API working as expected after being fixed in v2.0.10. Thanks again for the report.

Let us know if anything else does not work as expected. Thanks!

pythonandchips commented 2 years ago

@obetomuniz Thanks you very much

Victoriacsl commented 2 years ago

Hey @pythonandchips, The bug still exists。