v151 · css · pwa
window-drag
A CSS property that designates regions of an installed PWA's UI as draggable titlebar surface. Click-and-drag in a window-drag: drag region moves the OS window; no-drag opts a specific child back out so buttons keep working.
concepts
-
Titlebar Mock
A mocked-up custom titlebar with a drag region, app controls, and a window-controls overlay area. Annotated to show exactly which CSS rule applies to each strip.
-
No-drag Event Probe
The failure mode the web.dev guide warns about: drag regions swallow pointer events. Click buttons placed in drag vs no-drag zones and watch an event log fill (or not). Demonstrates why every interactive element inside a custom titlebar needs explicit
no-drag. -
Multi-Zone Inspector
An interactive mock PWA layout — click any region to toggle it between
dragandno-drag, and watch the generated CSS update live. Shows how real apps need both: a wide title-bar drag area plus explicitno-dragon every button and sidebar item. -
Inheritance Debugger
A live mini-DOM where every node has a
window-dragdropdown. The right column shows the effective computed value plus whether it was inherited. Spot the common bug: a button inside a draggable titlebar inheriting "drag" and silently stopping clicks. -
Legacy app-region Comparator
Paste your old
-webkit-app-regionCSS and get the modernwindow-dragequivalent — single output or transitional "emit both" mode. Plus a cross-browser support matrix and a liveCSS.supports()probe on this device. -
Install Readiness Wizard
Six live checks — secure context, display mode,
CSS.supports(),navigator.windowControlsOverlay, Chrome version, and install prompt — that tell you exactly whetherwindow-dragis active in this session and precisely why not if it isn't. -
OS Integration Storyboard
Visual comparison across five states: browser tab, standalone installed, Window Controls Overlay, file-handler launch, and legacy
-webkit-app-regionmigration. Each card shows the applicable CSS and a window mockup — plus a live card detecting the current browser's actual state. -
Policy & Rollback Tool
Three generators: a manifest snippet builder (name, colours, WCO toggle), a CSS migration converter from
-webkit-app-regiontowindow-dragwith "emit both" / "modern only" / "legacy only" modes, and an analytics continuity checker showing how to keep pointer-event tracking alive inside drag regions.
why it shipped
Installed PWAs and Window Controls Overlay let sites paint their own title bar — but until now, the platform didn't have a way to say "the user dragging here should move the window". Authors hacked around it with synthetic pointermove handlers and window.moveTo, which only works in standalone windows and feels off compared to native. The window-drag property hands the drag intent to the platform: drag in a "drag" region, the OS moves the window at its native frame rate; drag in a "no-drag" region (the button strip), nothing window-y happens.
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗