From d538cf683e5b5e39f1ec59e75e1c3cca2e57adeb Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 19 Aug 2016 13:58:22 +0200 Subject: [PATCH] cefclient: Allow dragging of fragments and show message when blocking URLs/files (issue #1976) --- tests/cefclient/browser/client_handler.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/cefclient/browser/client_handler.cc b/tests/cefclient/browser/client_handler.cc index 71b77f9d5..453c21914 100644 --- a/tests/cefclient/browser/client_handler.cc +++ b/tests/cefclient/browser/client_handler.cc @@ -356,9 +356,12 @@ bool ClientHandler::OnDragEnter(CefRefPtr browser, CefDragHandler::DragOperationsMask mask) { CEF_REQUIRE_UI_THREAD(); - // Forbid dragging of link URLs. - if (mask & DRAG_OPERATION_LINK) + // 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; + } return false; }