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

copy to clipboard test #605

Closed
Yaffle opened this issue Jun 1, 2012 · 7 comments · May be fixed by #659
Closed

copy to clipboard test #605

Yaffle opened this issue Jun 1, 2012 · 7 comments · May be fixed by #659
Assignees

Comments

@Yaffle
Copy link

Yaffle commented Jun 1, 2012

?

@ghost ghost assigned paulirish Jun 1, 2012
@SlexAxton
Copy link
Member

Went ahead and assigned @paulirish on this.

@Yaffle
Copy link
Author

Yaffle commented Jun 1, 2012

Chrome/Safari as far as i know support copy/paste/cut events and allows to use event.clipboardData.setData;
IE supports window.clipboardData ... and fires copy/paste/cut events (although, seems, this events is fired only when some text is selected)
Opera - http://www.opera.com/docs/specs/presto2.10/#m210-294
Firefox - seems, support copy event, but not allows to use "clipboardData" - https://bugzilla.mozilla.org/show_bug.cgi?id=407983

@ryanseddon
Copy link
Member

There is a proposal for a clipboard API http://www.w3.org/TR/clipboard-apis/

@Yaffle
Copy link
Author

Yaffle commented Jun 1, 2012

the question is: "how to detect, that event.clipboardData.setData or window.clipboardData.setData is supported?"

@Yaffle
Copy link
Author

Yaffle commented Aug 9, 2012

Opera 12.50 supports clipboardData

@paulirish
Copy link
Member

@Yaffle do you have a proposal on the detect? i dont know this area too well

fivetanley added a commit to fivetanley/Modernizr that referenced this issue Aug 18, 2012
First attempt at correctly detecting support for Clipboard API.
@Yaffle
Copy link
Author

Yaffle commented May 18, 2018

I think, document.queryCommandSupported('copy'); should work fine these days.
For Fifefox < 41 it returns true so it should be checked that document.queryCommandEnabled('copy') != undefined does not throw an error;
And document.queryCommandSupported is undefined on Opera Mini...

@Yaffle Yaffle closed this as completed May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants