Commit ed48750c authored by scheib's avatar scheib Committed by Commit bot

Document Chrome App window draggability via webkit-app-region CSS.

Review URL: https://codereview.chromium.org/576323002

Cr-Commit-Position: refs/heads/master@{#295484}
parent 6c342178
<h2 id="draggable">A note on draggable window areas</h2><p>
<p>
Windows can be moved by dragging on the default title bar,
but frameless windows do not have that affordance.
The CSS property <code>-webkit-app-region</code> can be given the values
<code>drag</code> and <code>no-drag</code> to allow content of a window
to create draggable areas. Care must be taken when setting a high level
DOM node to drag, any child that is intractable/clickable must be set to
no-drag. E.g.
<p>
<pre data-filename="window.html">
&lt;div class='title-area'>
A draggable area. &lt;div class='title-button'>clickable button&lt;/div>
&lt;/div>
</pre>
<pre data-filename="style.css">
.title-area {
-webkit-app-region: drag;
}
.title-button {
-webkit-app-region: no-drag;
}
</pre>
<p>
See the <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/frameless-window">Frameless Window Sample</a> as an example.
</p>
{{+partials.standard_apps_api api:apis.apps.app_window/}}
{{+partials.standard_apps_api api:apis.apps.app_window intro:intros.app_window/}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment