Opened 9 years ago

Closed 9 years ago

#12421 closed Bug (fixed)

[Chrome] Drop position invisible

Reported by: Piotrek Koszuliński Owned by: Piotr Jasiun
Priority: Normal Milestone: CKEditor 4.5.0 Beta
Component: General Version: 4.5.0 Beta
Keywords: Cc:


There's no caret visible when dragging. Most likely caused by preventing dragover which I don't know why we do.

Change History (6)

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 9 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: confirmedassigned

comment:3 Changed 9 years ago by Piotr Jasiun

Status: assignedreview

I introduced preventing dragover in #12264, because without it, when user drop the file, the file path will became an URL and user will lose content. As long as I know there is no other way to prevent this behavior (drop event is too late). The problem is that we lose cursor at the same time. But...

On Chrome and Firefox

Fortunately this is only IE problem, do not need to prevent dragover on non-IEs.

On IE 10+

The problem is only with file dropping. We have no files available on dragover, but we can check in dataTransfer.types if it is file, so we can prevent default dragover only in these cases. We have no cursor when we drop file on IE anyway so we lose nothing.

On IE 9-

Unfortunately old IEs does not support file API and we are not able to check if it is file or text. What is even worst preventing default dragover breaks whole drag & drop badly (drop position is incorrect) on IE9. Fortunately old IEs does not support file API, so this is not our problem. IE9- users should not drop files into the browser because it is not supported there. If they do it, they will get the same result as in CKEditor 4.4: the URL will be replaces with file path.

To sum up, I changed the method so now preventDefault is called only on IE10+, only if the file is dragged.

Changes in t/12421.

comment:4 Changed 9 years ago by Piotrek Koszuliński

Sounds great and terribly at the same time :) Thanks for the analysis.

comment:5 Changed 9 years ago by Piotrek Koszuliński

I reported a bug for this issue:

The problem here is that drop isn't fired and definitely should be.

comment:6 Changed 9 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reviewclosed

Fixed on major with git:039a91a.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy