1

Clipboard.js is working well in Chrome (v50.0), but won't copy text on Firefox (v46.0).

clipboard.on('error', function(e){...}) is being thrown, and clipboardjs is supported on v41+, but the error provides no information beyond providing which button was clicked to trigger the copy.

Any ideas what could be happening here or what I could check/try?

1 Answer 1

1

in the documentation it says that it's not supported in safari

Although copy/cut operations with execCommand aren't supported on Safari yet (including mobile), it gracefully degrades because Selection is supported.

That means you can show a tooltip saying Copied! when success event is called and Press Ctrl+C to copy when error event is called because the text is already selected.

For a live demonstration, open this site on Safari.

to get information about what was clicked check the trigger

clipboard.on('error', function(e) { console.error('Action:', e.action); console.error('Trigger:', e.trigger); }); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.