CefDragHandler::OnDraggableRegionsChanged is not called

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefDragHandler::OnDraggableRegionsChanged is not called

Postby blackknife » Sun Apr 26, 2020 8:24 pm

CefDragHandler::OnDraggableRegionsChanged is not called when html element class that has -webkit-app-region: drag attribute is updated.

My Cef version: 80.0.4+g74f7b0c+chromium-80.0.3987.122
blackknife
Techie
 
Posts: 26
Joined: Sun Apr 14, 2019 11:53 pm

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby magreenblatt » Tue Apr 28, 2020 11:08 am

What OS? This works fine for me with M83 on Windows 10:
Code: Select all
cefclient.exe --use-views --url=http://tests/draggable
magreenblatt
Site Admin
 
Posts: 10188
Joined: Fri May 29, 2009 6:57 pm

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby blackknife » Tue Apr 28, 2020 8:13 pm

magreenblatt wrote:What OS? This works fine for me with M83 on Windows 10:
Code: Select all
cefclient.exe --use-views --url=http://tests/draggable


My Windows version is win10 1803.

You can use this html to debug draggable region.
Click red region to toggle class that contain "-webkit-app-region: drag;" attribute. When the div's drag class has been added, it still can't be dragged.

Code: Select all
<!DOCTYPE html>
<html>
<head>
    <title>Document</title>
    <style>
        .drag
        {
            -webkit-app-region: drag;
        }
    </style>
</head>
<body>
    <div id="drag_region" style="background-color: red; width: 200px; height: 200px;"></div>
</body>
</html>
<script>
    document.querySelector("#drag_region").addEventListener("click", function(ev)
    {
        if(ev.target.classList.length == 0)
            ev.target.classList.add("drag");
        else
            ev.target.classList.remove("drag");
    });
</script>
blackknife
Techie
 
Posts: 26
Joined: Sun Apr 14, 2019 11:53 pm

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby Czarek » Wed Apr 29, 2020 6:47 am

What if you set position to absolute as in cefclient's draggable.html test?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. I'm available for contract work, see my resume.
User avatar
Czarek
Virtuoso
 
Posts: 1869
Joined: Sun Nov 06, 2011 2:12 am

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby blackknife » Wed Apr 29, 2020 10:30 pm

Czarek wrote:What if you set position to absolute as in cefclient's draggable.html test?


It still can't drag.

New code that set position to absolute:
Code: Select all
<!DOCTYPE html>
<html>
<head>
    <title>Document</title>
    <style>
        .drag
        {
            -webkit-app-region: drag;
        }
    </style>
</head>
<body>
    <div id="drag_region" style="background-color: red; width: 200px; height: 200px; position: absolute; left: 0; top: 0;"></div>
</body>
</html>
<script>
    document.querySelector("#drag_region").addEventListener("click", function(ev)
    {
        if(ev.target.classList.length == 0)
            ev.target.classList.add("drag");
        else
            ev.target.classList.remove("drag");
    });
</script>
blackknife
Techie
 
Posts: 26
Joined: Sun Apr 14, 2019 11:53 pm

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby magreenblatt » Thu Apr 30, 2020 10:13 am

Indeed, it appears that RenderFrameObserver::DraggableRegionsChanged is not called by Chromium on dynamic assignment of the "-webkit-app-region: drag" style. You can file a bug at https://crbug.com/.
magreenblatt
Site Admin
 
Posts: 10188
Joined: Fri May 29, 2009 6:57 pm

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby blackknife » Tue May 05, 2020 8:55 pm

Thanks for your answer. I will do it.
blackknife
Techie
 
Posts: 26
Joined: Sun Apr 14, 2019 11:53 pm

Re: CefDragHandler::OnDraggableRegionsChanged is not called

Postby ajitchavan » Mon Jun 29, 2020 5:27 am

@magreenblatt, Is this issue fixed ?
If no, can I know know the status of it and when is it planned?

I could see same issue in chromium version - 83.3.12+g0889ff0+chromium-83.0.4103.97
@blackknife, Did you post this issue at https://bugs.chromium.org/p/chromium/issues/list ?
ajitchavan
Techie
 
Posts: 11
Joined: Mon Mar 16, 2020 7:03 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 21 guests