Add modal backdrop-close, scroll-lock and dropdown placement rules

modal-workflows 1.3: a backdrop close needs the press and the release on the
backdrop; the page behind an open modal does not scroll.
controls-selection 1.4: dropdowns open upward when there is no room below and
never leave the viewport.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail ChusavitinandClaude Opus 5.5 committed 2026-10-02 17:01:12 +03:00
1 parent 577aa20fe3
commit 714447aa06
2 files changed
+26 -2

No files matched your search

+15 -1
View File
@@ -1,6 +1,6 @@
# Contract: Controls + Selection
Version: 1.3
Version: 1.4
## Shared Base
@@ -28,6 +28,20 @@ Version: 1.3
other in-page element. Use a `button` (or button-styled control) instead, unless the user
explicitly asks for a hyperlink. Hyperlinks are reserved for navigation to another URL/page.
## Dropdowns and Popups
Applies to every floating panel anchored to a control: autocomplete/combobox lists, custom
selects, multiselect filters, menus, date pickers.
- A panel opens below its control by default. When it does not fit below and there is more room
above, it opens upward. Decide on every open and on scroll/resize while open, from the control's
actual position in the viewport; never hardcode a direction.
- A panel must never extend past the viewport edge. If it fits neither way, cap its height to the
room available on the chosen side and let it scroll.
- A panel must not be clipped by an ancestor's `overflow` (modal body, table wrapper). Position it
against the viewport (`position: fixed` or a body-level layer), not inside the clipping container.
- Implement placement once in the shared dropdown code; do not re-derive it per control.
## Checkbox Selection
- Row checkboxes support bulk actions from a shared action bar.