Skip to content
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

Uploading image gets deleted when being cut/pasted with surrounding content #17628

Open
f1ames opened this issue Dec 11, 2024 · 0 comments
Open
Labels
package:image package:upload type:bug This issue reports a buggy (incorrect) behavior.

Comments

@f1ames
Copy link
Contributor

f1ames commented Dec 11, 2024

📝 Provide detailed reproduction steps (if any)

A specific case of #16967.

  1. Set network throttling to 3G in the developers console. A real scenario would be user having a slow internet connection.
  2. Add some content (few lines) in the editor.
  3. Add/insert image (e.g. via upload).
  4. While the image is still uploading:
    1. Select line before image + image + line after image.
    2. Cut.
    3. Paste
Screen.Recording.2024-12-11.at.14.57.17.mov

✔️ Expected result

Image is pasted correctly and upload continues.

❌ Actual result

Pasted image is broken.

On 40.0.0 (up to 43...) nothing is really pasted and error thrown:

ckeditorerror.js:90 Uncaught (in promise) CKEditorError: Cannot read properties of undefined (reading 'isFulfilled')
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Cannot read properties of undefined (reading 'isFulfilled')
    at pp.abort (filerepository.js:334:39)
    at Vh.<anonymous> (imageuploadediting.js:154:40)
    at Vh.fire (emittermixin.js:146:47)
    at Vh._handleChangeBlock (document.js:266:22)
    at rd._runPendingChanges (model.js:807:31)
    at rd.enqueueChange (model.js:198:22)
    at imageuploadediting.js:278:19

And on the latest one (44.0.0) it works as shown in the video above, no errors, empty image pasted.

❓ Possible solution

...

📃 Other details

  • Browser: Reproduced on Chrome and Safari@iOS
  • OS: macOS, iOS
  • First affected CKEditor version: 40.0.0 or earlier
  • Installed CKEditor plugins: Image upload related plugins

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@f1ames f1ames added package:image package:upload release:potential-blocker This issue potentially blocks the upcoming release (should be checked). type:bug This issue reports a buggy (incorrect) behavior. labels Dec 11, 2024
@pomek pomek removed the release:potential-blocker This issue potentially blocks the upcoming release (should be checked). label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image package:upload type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants