Images getting duplicated when clicking and/or dragging-and-dropping quickly
📝 Provide detailed reproduction steps (if any)
- Open a CKEditor demo page (https://ckeditor.com/ckeditor-5/demo/feature-rich/).
- Insert an image.
- Start clicking and/or drag-and-dropping the image really fast.
https://github.com/user-attachments/assets/c336e9c2-545c-4a7a-b8a6-6fc282d4c563
✔️ Expected result
Nothing happens.
❌ Actual result
Image gets duplicated.
📃 Other details
- Browser: Firefox version 129.x
- OS: Windows
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Thanks for the issue, I cannot reproduce on FF + Mac, @ckeditor/qa-team could you check?
I was able to reproduce it on the docs demo and on all-features manual test as well:
Uncaught TypeError: this._native is null
get isCanceled datatransfer.ts:113
_setupDragging dragdrop.ts:314
fire emittermixin.ts:241
fireListenerFor bubblingemittermixin.ts:207
fire bubblingemittermixin.ts:118
fire domeventobserver.ts:100
onDomEvent clipboardobserver.ts:98
observe domeventobserver.ts:76
fire emittermixin.ts:241
domListener emittermixin.ts:340
attach emittermixin.ts:270
_addEventListener emittermixin.ts:314
addEventListener emittermixin.ts:894
listenTo emittermixin.ts:162
listenTo emittermixin.ts:115
listenTo emittermixin.ts:112
observe domeventobserver.ts:74
observe domeventobserver.ts:73
attachDomRoot view.ts:317
init classiceditorui.ts:107
create classiceditor.ts:194
promise callback*__webpack_modules__</create/< classiceditor.ts:194
create classiceditor.ts:191
You need to move the mouse just a bit while clicking very fast.
@FilipTokarski Firefox or everywhere?
Just Firefox. Chrome and Safari seem to be fine.
I can also confirm that I was able to reproduce the issue only on Firefox
@kubaklatt Can you check if the issue still happens on Firefox 131? I'm trying to reproduce it but haven't been able to.
@Mati365 Yes, the problem still occurs on Firefox 131 - you have to click quickly while moving the mouse
Expected behavior on Chrome:
https://github.com/user-attachments/assets/6ed3520a-fb57-46e3-adc4-1ed3dbc07b09
Actual behavior on Firefox:
https://github.com/user-attachments/assets/7e99ee49-3346-44b0-afa5-9fc458262c4d
I managed to reproduce that on Chrome with CPU 20x Slowdown. Looks like race condition between selection and clipboard.