I'm using cefclient in Unreal Engine. When you drag any image in the normal chrome browser, it will give preview of image.

But, when I tried to do the same in cefclient, it didn't work. So I tried downloading the cefclient executable and do the same. But it's giving alert like below..

Anyone knows how to fix this?
Download CEF/cefclient sources and find the given text:
// Forbid dragging of URLs and files.
if ((mask & DRAG_OPERATION_LINK) && !dragData->IsFragment()) {
test_runner::Alert(browser, "cefclient blocks dragging of URLs and files");
return true;
}
Searching for "chromiumembedded DRAG_OPERATION_LINK" gives you this comment:
The drag is blocked in cefclient\browser\client_handler.cc ClientHandler::OnDragEnter():
// Forbid dragging of link URLs.
if (mask & DRAG_OPERATION_LINK)
return true;
Howevever, it appears that this check is wrong in current CEF versions since |mask| is DRAG_OPERATION_COPY | DRAG_OPERATION_LINK | DRAG_OPERATION_MOVE when dragging both links and fragments.
The check should be fixed to properly differentiate between links and fragments.
For your purposes you can remove this check and all dragging operations will work in cefclient.
https://bitbucket.org/chromiumembedded/cef/issues/1885/drag-and-drop-of-selected-text-in-input#comment-27661218
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With