Merge fix-share-embed into dev (anchor SharePopover via documented MudPopover RelativeWidth; restore track-mode embed affordance)

This commit is contained in:
daniel-c-harvey
2026-06-17 06:42:10 -04:00
2 changed files with 14 additions and 19 deletions
@@ -1,14 +1,17 @@
@namespace DeepDrftPublic.Client.Controls
@* Overlay is viewport-level/fixed regardless of DOM nesting; placing it outside
the wrapper is harmless/cleaner but doesn't change its behavior. *@
<MudOverlay Visible="@_open" OnClick="@Close" AutoClose="true" />
the wrapper is harmless/cleaner but doesn't change its behavior.
AutoClose is deliberately OFF: its modeless pointer-down tracking closes the
popover on any click outside the overlay's DOM subtree — including the portaled
embed checkbox/copy-button — which kills the embed affordance. Backdrop
dismissal is handled by OnClick alone. *@
<MudOverlay Visible="@_open" OnClick="@Close" />
@* display:inline-block is the load-bearing property: it shrink-wraps this div
to the button, so MudPopover's portal reads the button's tight bounding rect
(via parentNode.getBoundingClientRect()) rather than a page-wide flow box.
position:relative is incidental. *@
<div class="deepdrft-share-popover-anchor">
@* Activator and popover share this wrapper so MudPopover's anchoring reads the
button's bounding rect. No shrink-wrap sizing — width/min-width come from the
documented RelativeWidth="Adaptive" on the popover, not from container CSS. *@
<div>
<MudTooltip Text="Share">
<MudIconButton Icon="@Icons.Material.Filled.Share"
Size="Size.Large"
@@ -19,9 +22,10 @@
</MudTooltip>
<MudPopover Open="@_open"
Fixed="false"
AnchorOrigin="Origin.BottomRight"
TransformOrigin="Origin.TopRight"
Fixed="true"
RelativeWidth="DropdownWidth.Adaptive"
AnchorOrigin="Origin.BottomLeft"
TransformOrigin="Origin.TopLeft"
Class="deepdrft-share-popover">
<MudStack Spacing="2" Class="deepdrft-share-popover-body">