[Bug] -webkit-app-region: drag not working with transparent overlay
Bug Description
The -webkit-app-region: drag CSS property is not working properly when using a transparent overlay for window dragging in frameless windows on macOS.
Steps to Reproduce
- Create a frameless window with
titleBarStyle: 'hidden' and decorations: false
- Add an element with
-webkit-app-region: drag and position: fixed covering the entire viewport
- Set the overlay to be transparent (
background: rgba(255, 255, 255, 0))
- Try to drag the window by clicking on the overlay
Expected Behavior
The window should be draggable when clicking anywhere on the transparent overlay.
Actual Behavior
The window is not draggable when clicking on the transparent overlay, regardless of the -webkit-app-region: drag setting.
Environment
- ElectroBun version: 1.18.1
- macOS version: 26.4.1
- Window configuration:
titleBarStyle: 'hidden',
frame: {
decorations: false,
resizable: true,
}
- CSS failing:
.drag-overlay {
position: fixed;
width: 100vw;
height: 100vh;
z-index: 10;
-webkit-app-region: drag;
pointer-events: all;
background: rgba(255, 255, 255, 0);
}
Additional Context
The issue occurs specifically when:
- Using a transparent overlay for window dragging
- The overlay covers other elements (like images)
- The window is frameless/titled
- Testing on macOS with native WebKit
The -webkit-app-region: drag works on opaque elements but fails when the element is fully transparent, which suggests a potential issue with transparency handling in the drag region detection.
Workarounds Tried
- Using semi-transparent background (rgba(255, 255, 255, 0.01)) - still doesn't work
- Adding red button with drag region - button shows but doesn't drag window
- Setting drag on container itself - interferes with other interactions
Possible Solutions
- Fix transparency handling for drag regions
- Ensure drag events propagate correctly from transparent overlays
- Alternative window dragging API for complex overlay scenarios
[Bug] -webkit-app-region: drag not working with transparent overlayBug Description
The
-webkit-app-region: dragCSS property is not working properly when using a transparent overlay for window dragging in frameless windows on macOS.Steps to Reproduce
titleBarStyle: 'hidden'anddecorations: false-webkit-app-region: dragandposition: fixedcovering the entire viewportbackground: rgba(255, 255, 255, 0))Expected Behavior
The window should be draggable when clicking anywhere on the transparent overlay.
Actual Behavior
The window is not draggable when clicking on the transparent overlay, regardless of the
-webkit-app-region: dragsetting.Environment
Additional Context
The issue occurs specifically when:
The
-webkit-app-region: dragworks on opaque elements but fails when the element is fully transparent, which suggests a potential issue with transparency handling in the drag region detection.Workarounds Tried
Possible Solutions