fix: keep the widget action menu off the drag handle (#44)
CI / build-and-test (pull_request) Successful in 2m24s

The menu's button is one of the item's corner controls, but it was left at
its own size: a menu-bar button measures 64px, twice the 32px slot the
corner offsets in styles.css assume. Painted after the grip and overlapping
it completely, it took every pointer event meant for the grip — widgets
could not be dragged at all.

Sized to 28px like the grip and the close button, so the slot math holds.
The top offset goes back to 14px with it, the 11px having compensated for
the taller button.

Covered by a Playwright test that checks the grip is the element hit at its
own centre and then drags the widget by it; the existing test only proved
the opposite direction, that dragging the menu button moves nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124BiJikbhbiEsNfJxdWM69
This commit is contained in:
Pit Friedrich
2026-07-28 22:08:46 +02:00
parent 71892ea7ad
commit 4e48e31011
2 changed files with 59 additions and 1 deletions
@@ -307,13 +307,26 @@ apex-chart.dialect-sparkline .apexcharts-xaxis {
its left one slot (32px) further in. */
.dialect-action-menu {
position: absolute;
top: 11px;
top: 14px;
right: 16px;
z-index: 1;
opacity: 0;
transition: opacity 120ms ease;
}
/* Its button is a corner control like the grip and the close button, so it is
sized like one. A menu-bar button at its own size is 64px wide, i.e. twice
its slot: painted after the grip, it swallowed the grip's pointer events and
left the widget undraggable. The button is a light-DOM child of the menu bar,
so plain selectors reach it. */
.dialect-action-menu vaadin-menu-bar-button {
width: 28px;
min-width: 0;
height: 28px;
padding: 0;
color: var(--dialect-ink);
}
.grid-stack-item:has(> .dialect-close-button) > .dialect-action-menu {
right: 48px;
}