Merge fix-sharepopover-anchor into dev (anchor release SharePopover under the share button via inline-block wrapper)
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
@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" />
|
||||
|
||||
@* 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">
|
||||
<MudTooltip Text="Share">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Share"
|
||||
Size="Size.Large"
|
||||
@@ -9,8 +18,6 @@
|
||||
aria-label="@(IsReleaseMode ? "Share this release" : "Share this track")" />
|
||||
</MudTooltip>
|
||||
|
||||
<MudOverlay Visible="@_open" OnClick="@Close" AutoClose="true" />
|
||||
|
||||
<MudPopover Open="@_open"
|
||||
Fixed="false"
|
||||
AnchorOrigin="Origin.BottomRight"
|
||||
@@ -64,3 +71,4 @@
|
||||
|
||||
</MudStack>
|
||||
</MudPopover>
|
||||
</div>
|
||||
|
||||
@@ -358,6 +358,15 @@ h2, h3, h4, h5, h6,
|
||||
font-family: var(--deepdrft-font-mono) !important;
|
||||
}
|
||||
|
||||
/* display:inline-block is load-bearing: it shrink-wraps the wrapper to the
|
||||
button so MudPopover's portal reads the button's tight bounding rect
|
||||
(parentNode.getBoundingClientRect()) instead of a page-wide flow box.
|
||||
position:relative is incidental — do not drop inline-block. */
|
||||
.deepdrft-share-popover-anchor {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.deepdrft-share-popover-body {
|
||||
padding: 0.75rem 1rem;
|
||||
min-width: 280px;
|
||||
|
||||
Reference in New Issue
Block a user