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

IText copy not working in IE and Edge #2839

Closed
nakamorichi opened this issue Mar 16, 2016 · 3 comments · Fixed by #2868
Closed

IText copy not working in IE and Edge #2839

nakamorichi opened this issue Mar 16, 2016 · 3 comments · Fixed by #2868

Comments

@nakamorichi
Copy link

Reproduce: try to copy text with IE and Edge from an IText textarea on http://fabricjs.com/test/misc/itext.html

I tried to catch the copy event, but no matter how I tried with Angular (ng-copy), jQuery ($('...').on('copy', ...), and plain JavaScript addEventListener, I couldn't catch copy events in IE and Edge. Does anyone in which way IE and Edge handle copy event differently than other browsers?

ps. paste seems to work, though

@asturur
Copy link
Member

asturur commented Mar 16, 2016

I didi with ctrl+c on edge and windows 10 and it goes.

@nakamorichi
Copy link
Author

That's strange, because I did it both in my Windows 10 PC and in my Mac running Windows 10 inside VirtualBox.

If I add a button that calls a function that calls document.executeCommand('copy'), the event fires, but with ctrl+c it does not fire. Do you have the most recent version of IE11 and Edge? Do you get the popup window requesting permission to access clipboard? There might be some recent changes in the way MS browsers handle copy event.

@asturur
Copy link
Member

asturur commented Mar 29, 2016

In windows 7 + ie 11 does not copy. Windows 10 and edge does. ( i should double check again ).
I fighted with it a bit, it looks like the hiddenTextarea does not receive the copy event.

If we handle it like a CUT command ( sniffing CTRL+C) it works.
http://www.deltalink.it/andreab/fabric/iphone.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants