-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Workaround for Edge not supporting custom MIME types in dataTransfer.setData
#962
Comments
There is one specific issue I stumbled upon when working on the fix:
I wasn't able to reproduce this issue with plain contenteditable, however |
There is one more issue worth mentioning here. While the code setting a It happens due to a fact that for such transfers the However, the
The solution might be resetting all available mime types (so |
Reported issue with |
This is just a hack relying on current browser implementation bug. Instead the problem here is that clipboard api tries to overwrite datatransfer in The solution here would be to fix the source of it, and call (our) |
|
Are you reporting a feature request or a bug?
Task
Provide detailed reproduction steps (if any)
Extracted from #468.
Upstream issue https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8007622.
The Edge browser still does not support custom MIME types in
dataTransfer.setData
. This are used inclipboard
plugin for storingdataTransfer
id (which is used to much dataTransfer objects between events).The proposal is to apply a workaround which will save custom MIME types in
text/html
MIME type as an HTML comment like:Where
DATA
is stringifed and encoded JSON object.This will happen dynamically as Edge throws an error/exception when custom MIME types is set. The exception will be caught and fallback used.
The text was updated successfully, but these errors were encountered: