@bobfrankston/rmfmail 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2237,7 +2237,7 @@ ${csp}
2237
2237
  // dismissers it sees. The parent's debounced 500 ms show-timer still
2238
2238
  // suppresses flicker.
2239
2239
  var lastHoveredHref = "";
2240
- function postLinkHover(href, rect) {
2240
+ function postLinkHover(href, rect, mouse) {
2241
2241
  // Only post on transitions to avoid spamming the parent on every
2242
2242
  // mousemove inside a link.
2243
2243
  if (href === lastHoveredHref) return;
@@ -2246,6 +2246,11 @@ ${csp}
2246
2246
  type: "linkHover",
2247
2247
  url: href,
2248
2248
  rect: rect ? { left: rect.left, top: rect.top, right: rect.right, bottom: rect.bottom } : null,
2249
+ // Cursor position (iframe-viewport coords) so the parent can anchor
2250
+ // the tooltip AT the pointer, not at the link's bottom-left corner \u2014
2251
+ // on a wide link/banner the corner is far from the cursor (Bob
2252
+ // 2026-06-13: "displays the URL far from the cursor").
2253
+ mouse: mouse || null,
2249
2254
  }, "*");
2250
2255
  }
2251
2256
  document.addEventListener("mouseover", function (e) {
@@ -2254,7 +2259,7 @@ ${csp}
2254
2259
  var href = a.getAttribute("href") || "";
2255
2260
  if (!href || href.charAt(0) === "#" || href.indexOf("javascript:") === 0) return;
2256
2261
  var r = a.getBoundingClientRect();
2257
- postLinkHover(a.href || href, r);
2262
+ postLinkHover(a.href || href, r, { x: e.clientX, y: e.clientY });
2258
2263
  }, true);
2259
2264
  document.addEventListener("mouseout", function (e) {
2260
2265
  var a = e.target && e.target.closest ? e.target.closest("a[href]") : null;
@@ -9063,7 +9068,14 @@ window.addEventListener("message", (e) => {
9063
9068
  }
9064
9069
  }
9065
9070
  const r = data.rect;
9066
- if (iframeRect && r) {
9071
+ const m = data.mouse;
9072
+ if (iframeRect && m) {
9073
+ const x = Math.max(4, Math.min(window.innerWidth - 528, iframeRect.left + m.x + 12));
9074
+ let y = iframeRect.top + m.y + 18;
9075
+ if (y + 60 > window.innerHeight) y = Math.max(4, iframeRect.top + m.y - 60);
9076
+ pop.style.left = x + "px";
9077
+ pop.style.top = y + "px";
9078
+ } else if (iframeRect && r) {
9067
9079
  const x = Math.max(4, Math.min(window.innerWidth - 528, iframeRect.left + r.left));
9068
9080
  let y = iframeRect.top + r.bottom + 4;
9069
9081
  if (y + 60 > window.innerHeight) y = Math.max(4, iframeRect.top + r.top - 60);