New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-webkit-app-region: drag stops working when BrowserView is changed #20926
Comments
Update: Reloading |
I can confirm that on macOS after changing the |
I've had a similar problem after upgrading from electron 4 to 7. To me, the problem appears when I vertically resize the window, and gets "fixed" if I resize the window horizontally or minimize/restore it. I found a workaround for this problem here: nwjs/nw.js#2375 (comment) I just added an extra node to my app: <body>
<!-- app content here -->
<div style="-webkit-app-region: no-drag;"></div>
</body> I still haven't investigated why this fixes the problem, but with this I no longer see the issue. I hope this helps. |
Have the same issue here. |
@ivanalejandro0 Despite it fixes the issue with vertical resizing, it still doesn't fix the issue with changing BrowserViews. |
I found a workaround for this issue. You can try increasing window's width (or height, if you've applied @ivanalejandro0's fix) by 1 and then restoring it to the original size. Example code: const { width } = win.getBounds();
win.setBounds({ width: width + 1 });
win.setBounds({ width }); |
Fixed with #21723 |
same issue in electron 10.1.5 in windows 10, browser view is not draggable after removing and adding |
Preflight Checklist
Issue Details
Expected Behavior
User should be able to drag HTML component with
-webkit-app-region: drag
to move window around.Actual Behavior
When the React app is first loaded, it works. When BrowserView is changed, HTML parts with
-webkit-app-region: drag
are no longer draggable. Clicking the components won't fix the problem but try to perform dragging operation on these components would then fix it.To Reproduce
$ git clone https://github.com/quanglam2807/webcatalog -b v17.1.2 $ cd webcatalog/template $ yarn $ yarn electron-dev
Electron will run. The sidebar includes
-webkit-app-region: drag
and can be dragged. Add multiple workspaces, then try to switch workspace. TheBrowserView
will be changed. Then, you would no longer be able to drag the side.Hole a workspace icon on the sidebar and try to drag it, the app would let you rearrange workspaces. Then sidebar is now draggable again.
v16.1.2
is the last version of the app usingelectron@6.0.12
and it still works ok. The commit following it: webcatalog/webcatalog-legacy@ecf3513 causes the issue.Reported by user: webcatalog/webcatalog-legacy#354.
Screenshots
Additional Information
None
The text was updated successfully, but these errors were encountered: