Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
BrowserView: Allow dragging of window to screen above menubar #10661
When implementing the BrowserView drag behavior, I was clever and added logic to prevent the window from being dragged underneath the menubar. Downside: If there's a screen above the menubar, users won't be able to drag the window there.
This code change is only relevant when Electron is built with an SDK < 10.11 (which Electron currently does, sadly). If built with >= 10.11, you'll get native drag behavior. Below, you'll get this fix: It'll check if there's a screen above the menubar, and if so, allow dragging it there.
If you're wondering why all of this is necessary: The BrowserView is above everything else, including all the layers that NSApplication and NSWindow add to our window.