-
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
CKEditor erroneously perceives internal copy & paste as type "external" #921
Comments
With a little more debugging the problem seems to be, that method As it seems As the information of the transfer type is also used for drag & drop it might be possible that we detect another symptom of this defect: In our editor drag & drop within MSIE11 is not possible at all (even internally). |
If there is no way to determine the sourceEditor what about introducing an additional state for the transfer type: |
Thanks for investigation. It looks that, as you have provided, the source editor is not defined. AFAICS reason for it is that it's being passed in dataTransfer object, and IE do not use dataTransfer at all. It would be better to fix that problem at all, same thing might happen on iOS. |
Thanks for the analysis. Then I'd suggest to close this issue either as won't fix — or to consider to introduce a workaround, i. e. a possibility to hook into the consideration if this is an internal or external paste. I suppose that, knowing our product, we could use additional strategies to distinguish internal from external paste. |
Just re-validated for a supported Browser: The same issue occurs in Edge. Emulation settings in Edge: Browser Profile: Desktop, User Agent String: Microsoft Edge (Default). Chrome and Firefox correctly answer the paste-listener above with "internal". |
Regarding MSIE11: Can you give a reference for the end of support for MSIE11? All I see that all older MSIE browsers are EOL as of January 2016. References: |
Hello @mmichaelis,
Which means some bug fixes may be provided, however |
Hello @f1ames, |
@mmichaelis, as mentioned before for Edge browser it will be fixed in #468. As for IE11 I don't see any reasonable improvement. As the browser makes it nearly impossible to accurately distinguish external copy/paste from internal/cross-editor there is no point in introducing In your case if you would like to apply some additional checks you may listen to |
For IE11 there's nothing we can do to support that. Thus I'll change this issue to track Edge only. @mmichaelis If you're willing to go great lengths to adjust it somehow for IE11 on your setup, your best place is to customize dataTransfer.getTransferType. You'll need simply to override Just watch out, depending whether you're working with a built CKE version it might be available synchronously, or asynchronously after the clipboard plugin is loaded. |
Fixed in latest Edge by #1153. Why did GH not close it automatically... 🤔 |
Are you reporting a feature request or a bug?
Bug
Check if the issue is already reported
Provide detailed reproduction steps (if any)
Expected result
Log-Output states: Internal paste.
Actual result
Log-Output states: External paste.
The overall result is bad, as the content processing differs for internal and external pastes. In our environment it even leads to the
pasteFromWord
plugin being triggered (cannot reproduce on ckeditor.com though).In Chrome the above code correctly returns '1' for internal paste. Analyzing the event's
editor
property and thedataTransfer
'ssourceEditor
property you will see that on Chrome both are the same (thus internal c&p) while in Edge the event'seditor
is correct, whilesourceEditor
is undefined.Reason for this is that currently Edge does not support Clipboard API, where CKEditor4 clipboard API stores the source editor id as a custom mime type.
Other details
The text was updated successfully, but these errors were encountered: