2017-07-27 156 views
1

我在虛幻引擎中使用了cefclient。當您在正常的瀏覽器中拖動任何圖像時,它將預覽圖像。 enter image description here在CEF客戶端中拖動時的圖像預覽

但是,當我試圖在cefclient中做同樣的事情時,它不起作用。所以我嘗試下載cefclient可執行文件並執行相同的操作。但它給像下面警報..

enter image description here

任何人知道如何解決這一問題?

回答

1

下載CEF/cefclient源和查找給定文本:

// 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; 
    } 

搜索"chromiumembedded DRAG_OPERATION_LINK"爲您提供了這樣的評論:

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