-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix bug #329: Copy-pasting does not work on IE11 #330
Conversation
Cool @YoranBrondsema! Can you put the clipboard And since you wrote the test helpers to properly fallback for non-standard API, I don't think you should need to skip the assertions in IE? We should definitely test the paste behavior in IE, or this could regress again and we would still miss it. |
Sure, just added that in the latest commit.
The thing is that the behavior of pasting is not entirely the same for Internet Explorer browsers now. If you look closely you see that I didn't skip all assertions on IE; I just modified the tests according to the altered behavior (the test suite The reason for the difference is that IEs don't make a difference between I chose to go this route as I didn't think having a regex-style "HTML-detector" that would detect whether to use |
@YoranBrondsema This is great, thanks. Truly odd that IE only maintains a "Text" property for the clipboard data. I'm going to merge this in and add two separate issues for follow up:
Perhaps in the future we can do something trickier, like retargeting the pasted content into a hidden textarea and reading out whatever (HTML or text) was pasted into it. |
Fix bug #329: Copy-pasting does not work on IE11
I think this is the way to go but I wanted to fix the biggest issues quickly, that's why I didn't end up doing this. Thanks for creating the follow-up issues! |
The Internet Explorers (including Edge) have a non-standard way of interacting with the Clipboard API (see http://caniuse.com/#feat=clipboard). In short, they expose a global
window.clipboardData
object instead of the per-eventevent.clipboardData
object on the other browsers.