05/07: updated extension password item's more option has been covered
This commit is contained in:
@@ -935,9 +935,7 @@ body {
|
|||||||
/* ── Three-dot flyout menu ───────────────────────────────────────────────── */
|
/* ── Three-dot flyout menu ───────────────────────────────────────────────── */
|
||||||
|
|
||||||
.pk-flyout {
|
.pk-flyout {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
top: calc(100% + 4px);
|
|
||||||
right: 0;
|
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
|
|||||||
@@ -1021,9 +1021,24 @@ function renderList() {
|
|||||||
flyout.appendChild(row);
|
flyout.appendChild(row);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Position flyout below the button, right-aligned.
|
// Position flyout using fixed coords so it escapes vault-list overflow clipping.
|
||||||
btn.style.position = "relative";
|
const appEl = document.getElementById("app");
|
||||||
btn.appendChild(flyout);
|
appEl.appendChild(flyout);
|
||||||
|
|
||||||
|
const btnRect = btn.getBoundingClientRect();
|
||||||
|
const flyoutH = flyout.offsetHeight || 120; // estimate if not yet painted
|
||||||
|
const spaceBelow = window.innerHeight - btnRect.bottom;
|
||||||
|
const flyoutW = flyout.offsetWidth || 160;
|
||||||
|
|
||||||
|
// Flip upward if not enough room below.
|
||||||
|
if (spaceBelow < flyoutH + 8) {
|
||||||
|
flyout.style.top = (btnRect.top - flyoutH - 4) + "px";
|
||||||
|
} else {
|
||||||
|
flyout.style.top = (btnRect.bottom + 4) + "px";
|
||||||
|
}
|
||||||
|
// Right-align with the button, but keep inside the popup.
|
||||||
|
const rightEdge = window.innerWidth - btnRect.right;
|
||||||
|
flyout.style.right = rightEdge + "px";
|
||||||
|
|
||||||
// Close on any outside click.
|
// Close on any outside click.
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user