Merge fix-sharepopover-anchor into dev (anchor release SharePopover under the share button via inline-block wrapper)
This commit is contained in:
@@ -1,17 +1,24 @@
|
|||||||
@namespace DeepDrftPublic.Client.Controls
|
@namespace DeepDrftPublic.Client.Controls
|
||||||
|
|
||||||
<MudTooltip Text="Share">
|
@* 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"
|
<MudIconButton Icon="@Icons.Material.Filled.Share"
|
||||||
Size="Size.Large"
|
Size="Size.Large"
|
||||||
Color="Color.Secondary"
|
Color="Color.Secondary"
|
||||||
Disabled="@(!RendererInfo.IsInteractive)"
|
Disabled="@(!RendererInfo.IsInteractive)"
|
||||||
OnClick="@Toggle"
|
OnClick="@Toggle"
|
||||||
aria-label="@(IsReleaseMode ? "Share this release" : "Share this track")" />
|
aria-label="@(IsReleaseMode ? "Share this release" : "Share this track")" />
|
||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
|
|
||||||
<MudOverlay Visible="@_open" OnClick="@Close" AutoClose="true" />
|
<MudPopover Open="@_open"
|
||||||
|
|
||||||
<MudPopover Open="@_open"
|
|
||||||
Fixed="false"
|
Fixed="false"
|
||||||
AnchorOrigin="Origin.BottomRight"
|
AnchorOrigin="Origin.BottomRight"
|
||||||
TransformOrigin="Origin.TopRight"
|
TransformOrigin="Origin.TopRight"
|
||||||
@@ -63,4 +70,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudPopover>
|
</MudPopover>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -358,6 +358,15 @@ h2, h3, h4, h5, h6,
|
|||||||
font-family: var(--deepdrft-font-mono) !important;
|
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 {
|
.deepdrft-share-popover-body {
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
min-width: 280px;
|
min-width: 280px;
|
||||||
|
|||||||
Reference in New Issue
Block a user