fix: Support experimental copy & paste in IE 11#349
Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://react-mentions-git-bugfix-348-copy-and-paste-ie11.wolf-pack.now.sh |
|
Okay, just adding the fallback doesn't solve the problem. Now I'm running into other error message when accessing |
|
It looks like IE 11 has a problem with the formats While looking for more details about the problem I found this ticket: ProseMirror/prosemirror#325 It looks like we would need some extra handling to support the new feature in IE 11. Now that makes me wonder if we should just disable the feature for IE 11 by checking for the existence of Then we stick to the browsers default behaviour for now. @frontendphil @jfschwarz Any opinion? |
45cca86 to
851e8fe
Compare
Codecov Report
@@ Coverage Diff @@
## master #349 +/- ##
==========================================
+ Coverage 76.82% 77.11% +0.29%
==========================================
Files 22 22
Lines 630 638 +8
Branches 95 98 +3
==========================================
+ Hits 484 492 +8
Misses 145 145
Partials 1 1
Continue to review full report at Codecov.
|
frontendphil
left a comment
There was a problem hiding this comment.
I think aiming for modern browsers and ditching IE 11 is ok 👍
Fixes #348
I added a fallback to usewindow.clipboardDatawhenevent.clipboardDatais not defined, which is the case in IE 11, when the new experimental copy and paste feature is used.Following the investigation in this PR, I disabled the new cut, copy, paste mechanism for browsers whose events do not have
clipboardDataattached to the event. This concerns mostly IE.In IE 11 the
clipboardDataobject is attached towindowand only supports mime typetext. Therefore, the new mechanism will not work anyway as it makes use of two different mime types.How to test?