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

Clipboard doesn't update if onCopy is defined #26

Open
azazdeaz opened this issue Sep 2, 2015 · 2 comments
Open

Clipboard doesn't update if onCopy is defined #26

azazdeaz opened this issue Sep 2, 2015 · 2 comments
Labels

Comments

@azazdeaz
Copy link

azazdeaz commented Sep 2, 2015

Hi, thanks a lot for this tool!

Maybe i doing something wrong but it's looks like the clipboard is only updating if i don't fill the onCopy param.

I tested on a basic example like:

<div>
   <p>Click the button to copy some text</p>
      <ReactZeroClipboard text="Hello, world!" onCopy={function(){}}>
         <button>Copy</button>
      </ReactZeroClipboard>
</div>

with [email protected]

@azazdeaz azazdeaz changed the title Clipboard don't update is onCopy is defined Clipboard doesn't update if onCopy is defined Sep 2, 2015
@brigand brigand added the bug label Sep 3, 2015
@brigand
Copy link
Owner

brigand commented Sep 3, 2015

I can reproduce, I'll look into this. Thanks

I'm getting a weird vague error, so it might take a while to figure out.

@trevorblades
Copy link

I found that using onAfterCopy rather than onCopy worked as expected.

cheshire137 added a commit to cheshire137/steam-palettes that referenced this issue May 15, 2016
Also only show 'copied' message for a couple seconds. See
brigand/react-zeroclipboard#26.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants