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
cefclient.exe --use-views --url=http://tests/draggable
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
<!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>
Czarek wrote:What if you set position to absolute as in cefclient's draggable.html test?
<!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>
Users browsing this forum: No registered users and 92 guests