fix: keep the widget action menu off the drag handle (#44) #45
Reference in New Issue
Block a user
Delete Branch "ai/issue-44-menu-overlays-drag-handle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #44
Cause
The corner controls of a
GridStackItem(grip, close button, action menu) are laid out in 32px slots bystyles.css. The action menu's button was left at its natural size — avaadin-menu-bar-buttonmeasures 64px, twice its slot. Since the menu is appended after the grip and both arez-index: 1, it painted over the grip and covered it completely, swallowing every pointer event meant for it. Result: widgets could not be dragged at all.Measured in the browser before the fix (offsets from the item's right edge):
Fix
Size the menu's button like the other corner controls (28px, no padding), so the existing slot math holds.
topgoes back to 14px with it — the 11px was compensating for the taller button.Test
WidgetActionMenuPlaywrightTest#draggingTheGrip_movesTheWidget: assertselementFromPointat the grip's centre actually hits the grip, then drags the widget by it and checks it changed slot. Red before the fix (expected: <dialect-drag-handle> but was: <dialect-action-menu>), green after. The existing test only covered the opposite direction — that dragging the menu button moves nothing../mvnw test— 68 tests, 0 failures.🤖 Generated with Claude Code
https://claude.ai/code/session_0124BiJikbhbiEsNfJxdWM69