-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Edge] Nothing is pasted when text + images selected #2530
Comments
1 minute later this appeared: It's weird... Perhaps this is only a performance issue on the VM we use for tests. @Mgsy could you test it on a real machine? |
It is quite interesting what happens here and the fact that it works correctly in other browsers. I recall I have a thought about that when working on integration with image upload but it slipped away somewhere along the process... 1. When content is pasted from Word first it goes through it fetches 2. Then the event with data is passed along the pipeline until the listener in it tries to fetch images (what happens here doesn't matter in this case) and edits the event 3. When the Why it doesn't work on Edge and works in other browsers?That's the crucial part. According to specs (AFAIR), access to |
☝️ I think it shows some conceptual problems with clipboard pipeline. As at some point we have decided that |
Isn't the biggest problem here that we re-fire the |
Yes, that's the issue here. |
☝️ I even considered if this can be done without stopping
|
You're right that the conceptual issue is with the clipboard pipeline. It assumes synchronous processing for two reasons:
And those problems appeared now :) In fact, a couple of them:
I think we can start working on this problem. But I'd start from finding a hack which will solve the Edge problem (e.g. a flag which will prevent the second |
We talked with @f1ames F2F about https://github.com/ckeditor/ckeditor5-paste-from-office/issues/44#issuecomment-443168832. We realised that this code: does not have to stop the event. It can create loader instances synchronously and set the const loader = fileRepository.createLoader( new Promise( resolve => {
resolve( file );
} ) );
loader.file; // -> null
loader.status; // -> 'uninitialized'
loader.read(); // errror!
loader.id; // -> 'idoftheloader'
// promise gets resolved by the `ImageUploadEngine` once `file` instance is returned by the native File API or whatever else...
loader.file // -> file instance
loader.status; // -> 'idle'
loader.id; // -> 'idoftheloader' It's important that cc @pjasiun |
But for now we implement a workaround in ckeditor/ckeditor5-paste-from-office#47 and https://github.com/ckeditor/ckeditor5-image/pull/257/files. |
The workaround is merged. That saves us some time. |
I have extracted the issue about async use of file loader to https://github.com/ckeditor/ckeditor5-upload/issues/87. Any further discussion could take place there if needed. cc @Reinmar @pjasiun |
Other: The image uploading listener for handling `base64/blob` images no longer stops `inputTransformation` event. Closes #263. Closes ckeditor/ckeditor5-paste-from-office#44.
It's strange because it soooometimes work (content appears, although images have local src, but that's a known Edge problem).
If we can't handle images in this case I'd expect that at least text is pasted.
The text was updated successfully, but these errors were encountered: