From 2f9d4996a8d3fcb0163e7b42a3b7e4fe00d38416 Mon Sep 17 00:00:00 2001 From: Nguyen Ngo Date: Thu, 7 May 2026 14:25:06 -0400 Subject: [PATCH] 05/07: updated extension password item's more option has been covered --- extension/popup/popup.css | 4 +--- extension/popup/popup.js | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/extension/popup/popup.css b/extension/popup/popup.css index f52dfed..b610a29 100644 --- a/extension/popup/popup.css +++ b/extension/popup/popup.css @@ -935,9 +935,7 @@ body { /* ── Three-dot flyout menu ───────────────────────────────────────────────── */ .pk-flyout { - position: absolute; - top: calc(100% + 4px); - right: 0; + position: fixed; z-index: 9999; background: #ffffff; border: 1px solid #e5e7eb; diff --git a/extension/popup/popup.js b/extension/popup/popup.js index 017dfa9..4b30dae 100644 --- a/extension/popup/popup.js +++ b/extension/popup/popup.js @@ -1021,9 +1021,24 @@ function renderList() { flyout.appendChild(row); }); - // Position flyout below the button, right-aligned. - btn.style.position = "relative"; - btn.appendChild(flyout); + // Position flyout using fixed coords so it escapes vault-list overflow clipping. + const appEl = document.getElementById("app"); + 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. setTimeout(() => {