electron: With Developer Tools open, `-webkit-app-region:drag` does not work
This is a regression—in Electron 0.35.1
, draggable regions of the window stop working when the developer tools are opened. This means that the window effectively can’t be moved while the developer tools are open. It doesn’t matter if the developer tools are docked or in a separate window.
I think this might be a side effect of an intentional change? In previous versions, you couldn’t use the “Inspect Element” feature to click and select part of the DOM that was in a draggable region (since it was still draggable.) That now works (I can hover over and click on my title bar), but I can’t move the window.
Here’s a sample app to reproduce. Open the app, enable “top toolbar” and then open the developer tools:
https://dl.dropboxusercontent.com/u/4803975/frameless-window.zip
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 31
- Comments: 36 (14 by maintainers)
Commits related to this issue
- fix(AppDrag): added back `Header` component, renamed to `AppDrag` Needed so that the app can be moved in electron mode. There is an electron bug, however, that does not allow you to move the app when... — committed to qri-io/2017-frontend by ramfox 6 years ago
- Fixed header drag & drop through external library. See: https://github.com/electron/electron/issues/3647 — committed to dat-ecosystem-archive/dat-desktop by martinheidegger 6 years ago
- Fixed header drag & drop through external library. See: https://github.com/electron/electron/issues/3647 — committed to dat-ecosystem-archive/dat-desktop by martinheidegger 6 years ago
- chore: added conditional value for windows to avoid losing dragging capabilities this address the electron v14 onward drag issue: https://github.com/electron/electron/issues/3647 — committed to Noovolari/leapp by urz9999 3 years ago
A workaround for those that are affected by this long standing bug - if you hover the mouse over the top edge of the window until you see a resize cursor and then hold and drag to the side instead of up and down to resize it will let you move the window.
Issue confirmed on macOS Sierra with Electron 1.6.4.
This issue should be at least documented if not fully resolvable in the near term due to low priority.
Not sure if this was fixed but it works for me now (electron
1.4.2
) with dev-tools open on Windows. Note, it is important to set the width and height, otherwise it would not work. Also, this only works when dragging from within the regular top area.Mac electron 7.1.7 -webkit-app-region: drag
move window not work after called setSize
Any updates on this issue? Still having it in
Still affects Electron 4.1.4.
This isn’t actually an issue with the dragging not working completely, it’s just that the hitboxes are placed incorrectly when the developer tools are open, i.e. they overlap some part of the developer tools sidebar and some parts of the non-draggable elements, while not being active over some elements that are supposed to be draggable.
Also, just upgraded and still having the issue in
still an issue on os x 10.11.6 with Electron 1.6.2 using either
frame: false
ortitleBarStyle: 'hidden'
I got 13.3.0 version and drag is working ❤❤❤
Had this issue on electron v 14.0.1 and 15.0.0 beta releases but downgrading to v ^13.0.0 solved my issue
I have the same issue. Current window can be dragged to everywhere freely, but it doesn’t work when i try to resize current window(remote.getCurrentWindow().setSize())
This seems to be more of an issue now that the titleBarStyle behaviour was changed to not have the top area draggable by default
Why the option -webkit-app does not show to me when writing?
Try downgrading to electron v 13.0.0
I have the same problem with drag