You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New title-bar-style feature breaks -webkit-app-region: drag #2862
Was very excited to switch from frame: false to title-bar-style: hidden but dismayed to discover that all the areas I marked -webkit-app-region: drag with CSS were no longer draggable. What's going on there?
I tested this. This doesn’t seem to be about the new title-bar-style breaking anything; rather, -webkit-app-region: drag only seems to work for me with frame: false. This does feel like a bug, since the documentation doesn’t limit the dragging working only to frameless windows.
I can definitely see how the drag behaviour would be useful with the new title bar styles as well. Not sure why it’s currently only working with a frameless window, need to dig around a bit more for this.
Okay. This comes from Chromium. Apparently, it’s implemented there such that the dragging property only has an effect when frame: false is set. But currently, when you set frame: false, you can’t get any of the new title bar look/behavior. The two API-s are a bit at odds with each other.
I can think of several ways to solve this, would be interested in feedback before jumping on any of them.
Patch Chromium so that -webkit-app-region: drag works regardless of the window configuration. (Sometimes it would be useful to have draggable elements in framed windows as well?)
Modify the Electron window setup behavior such that if title-bar-style: hidden, this to Chromium also means that frame:false, yet the title bar (which is invisible, doesn’t take up window content space, but still shows traffic lights) is still drawn on the Electron side.
There is another issue that was introduced at the same time that is proving to be really frustrating. Even with frame: false draggable regions are only draggable as long as the cursor stays inside them, so if you click and drag a window then it stops dragging when the cursor moves outside the bounds.
This essentially makes the feature useless in the last several releases.
Activity
jaanus commentedon Sep 22, 2015
I tested this. This doesn’t seem to be about the new
title-bar-stylebreaking anything; rather,-webkit-app-region: dragonly seems to work for me withframe: false. This does feel like a bug, since the documentation doesn’t limit the dragging working only to frameless windows.I can definitely see how the drag behaviour would be useful with the new title bar styles as well. Not sure why it’s currently only working with a frameless window, need to dig around a bit more for this.
jaanus commentedon Sep 22, 2015
Okay. This comes from Chromium. Apparently, it’s implemented there such that the dragging property only has an effect when
frame: falseis set. But currently, when you setframe: false, you can’t get any of the new title bar look/behavior. The two API-s are a bit at odds with each other.I can think of several ways to solve this, would be interested in feedback before jumping on any of them.
-webkit-app-region: dragworks regardless of the window configuration. (Sometimes it would be useful to have draggable elements in framed windows as well?)title-bar-style: hidden, this to Chromium also means thatframe:false, yet the title bar (which is invisible, doesn’t take up window content space, but still shows traffic lights) is still drawn on the Electron side.tommoor commentedon Sep 24, 2015
There is another issue that was introduced at the same time that is proving to be really frustrating. Even with
frame: falsedraggable regions are only draggable as long as the cursor stays inside them, so if you click and drag a window then it stops dragging when the cursor moves outside the bounds.This essentially makes the feature useless in the last several releases.
tommoor commentedon Sep 24, 2015
Video here: https://cloudup.com/ckixaDrf6NB - note I was holding the mouse at all times during this demo and this app does not use the new title-bar-style functionality - those window controls are css.
pronebird commentedon Nov 17, 2016
I can't drag when dev tools are displayed. Is it expected?
tommoor commentedon Nov 17, 2016
@pronebird it's a known issue, #3647