Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

window-drag — window dragging region

window-drag defines an area for moving an application window, not a page element. The property comes from the CSS UI Level 4 working draft.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

window-drag: none | move;

window-drag: move allows the element’s principal box to move the window; none excludes the element from that region. The initial value is none. The property is inherited, so controls inside the region need an explicit none.

During the window-move gesture, the browser does not dispatch pointer, mouse, or drag events on the element. This behavior takes precedence over draggable.

This is a draft feature, not a guarantee of Chromium 152 support. The example requires testing in the target application window.

Examples

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Draft window-drag support</title>
  <style>
    .titlebar { window-drag: move; padding: 1rem; background: #eee; }
    .titlebar button { window-drag: none; }
  </style>
</head>
<body>
  <header class="titlebar">Example window <button type="button" id="check">Check syntax support</button></header>
  <p id="result" role="status"></p>
  <script>
    const result = document.getElementById('result');
    function checkSupport() {
      const supported = CSS.supports('window-drag', 'move') && CSS.supports('window-drag', 'none');
      result.textContent = `window-drag syntax: ${supported ? 'supported' : 'unsupported'}`;
    }
    document.getElementById('check').addEventListener('click', checkSupport);
    checkSupport();
  </script>
</body>
</html>

Result

window-drag syntax: supported

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources