@bobfrankston/rmfmail 1.0.674 → 1.0.676

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.
@@ -1442,9 +1442,20 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1442
1442
  iframe.sandbox.add("allow-top-navigation-by-user-activation");
1443
1443
  iframe.sandbox.add("allow-scripts");
1444
1444
  iframe.srcdoc = wrapHtmlBody(msg.bodyHtml, msg.remoteAllowed);
1445
- iframe.addEventListener("load", () => _ptick("iframe load (rendered)"), { once: true });
1445
+ iframe.addEventListener("load", () => _ptick("iframe load (all resources)"), { once: true });
1446
+ const onReady = () => {
1447
+ const doc = iframe.contentDocument;
1448
+ if (!doc)
1449
+ return;
1450
+ const fire = () => _ptick("iframe DOMContentLoaded (text painted)");
1451
+ if (doc.readyState === "interactive" || doc.readyState === "complete")
1452
+ fire();
1453
+ else
1454
+ doc.addEventListener("DOMContentLoaded", fire, { once: true });
1455
+ };
1446
1456
  bodyEl.appendChild(iframe);
1447
- _ptick("iframe srcdoc set (waiting for load)");
1457
+ queueMicrotask(onReady);
1458
+ _ptick("iframe srcdoc set");
1448
1459
  installPreviewControls(iframe);
1449
1460
  } else if (msg.bodyText) {
1450
1461
  const pre = document.createElement("pre");
@@ -1783,14 +1794,12 @@ ${csp}
1783
1794
  document.addEventListener("mouseleave", function () {
1784
1795
  if (lastHoveredHref) postLinkHover("", null);
1785
1796
  }, true);
1786
- // Double-click on body \u2192 toggle preview fullscreen via parent.
1787
- document.addEventListener("dblclick", function (e) {
1788
- var t = e.target;
1789
- // Don't hijack on links (the user might be opening) or interactive controls.
1790
- if (t && t.closest && t.closest("a, button, input, select, textarea")) return;
1791
- e.preventDefault();
1792
- window.parent.postMessage({ type: "previewToggleFullscreen" }, "*");
1793
- });
1797
+ // Note: iframe-level dblclick fullscreen toggle REMOVED \u2014 it hijacked
1798
+ // word-selection (Bob 2026-05-11). Double-clicking text inside the
1799
+ // preview now selects the word like any other browser surface; the
1800
+ // fullscreen toggle lives on the viewer chrome (mv-header) handler
1801
+ // in app.ts, which explicitly excludes interactive controls but
1802
+ // operates on chrome, not iframe content.
1794
1803
 
1795
1804
  // Receive commands from the parent (Copy / Select all menu actions).
1796
1805
  // Browsers restrict execCommand("copy") to the document where focus
@@ -3560,8 +3569,9 @@ function renderEvents(events) {
3560
3569
  const titleAttr = clickable && link ? 'title="Click to open in Google Calendar"' : "";
3561
3570
  const dataLink = clickable ? `data-link="${escapeHtml4(link)}"` : "";
3562
3571
  if (e.isHoliday) {
3572
+ const symbol = holidayKind === "us" ? "\u{1F1FA}\u{1F1F8}" : holidayKind === "jewish" ? "\u2721\uFE0F" : "\u2726";
3563
3573
  html += `<div class="cal-side-event"${holidayAttr} data-id="${e.id}">
3564
- <span class="cal-side-event-title cal-side-event-holiday-title">${escapeHtml4(e.title)}</span>
3574
+ <span class="cal-side-event-title cal-side-event-holiday-title"><span class="cal-side-event-holiday-symbol">${symbol}</span> ${escapeHtml4(e.title)}</span>
3565
3575
  </div>`;
3566
3576
  } else {
3567
3577
  html += `<div class="cal-side-event" data-id="${e.id}"${recurAttr} ${dataLink} ${titleAttr}>
@@ -5664,6 +5674,33 @@ function propagateAppName() {
5664
5674
  }
5665
5675
  propagateAppName();
5666
5676
  window.__btick && window.__btick("app.ts module body executing");
5677
+ (function blockBrowserKeysAndMenu() {
5678
+ const isBlockedKey = (e) => {
5679
+ if (e.key === "F12") return false;
5680
+ if (e.key === "F5" || e.key === "F3") return true;
5681
+ if ((e.ctrlKey || e.metaKey) && (e.key === "r" || e.key === "R")) return true;
5682
+ if (e.ctrlKey || e.metaKey) {
5683
+ const k = e.key.toLowerCase();
5684
+ if (["p", "s", "u", "j", "l", "g", "o"].includes(k)) return true;
5685
+ }
5686
+ if (e.altKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) return true;
5687
+ if (e.key === "Backspace") {
5688
+ const t = e.target;
5689
+ const editable = t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable);
5690
+ if (!editable) return true;
5691
+ }
5692
+ return false;
5693
+ };
5694
+ document.addEventListener("keydown", (e) => {
5695
+ if (isBlockedKey(e)) {
5696
+ e.preventDefault();
5697
+ e.stopPropagation();
5698
+ }
5699
+ }, true);
5700
+ document.addEventListener("contextmenu", (e) => {
5701
+ if (!e.defaultPrevented) e.preventDefault();
5702
+ });
5703
+ })();
5667
5704
  var baseTitle = APP_NAME;
5668
5705
  var lastSeenCount = 0;
5669
5706
  var badgeCount = 0;