@bobfrankston/rmfmail 1.0.674 → 1.0.675

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
@@ -5664,6 +5673,33 @@ function propagateAppName() {
5664
5673
  }
5665
5674
  propagateAppName();
5666
5675
  window.__btick && window.__btick("app.ts module body executing");
5676
+ (function blockBrowserKeysAndMenu() {
5677
+ const isBlockedKey = (e) => {
5678
+ if (e.key === "F12") return false;
5679
+ if (e.key === "F5" || e.key === "F3") return true;
5680
+ if ((e.ctrlKey || e.metaKey) && (e.key === "r" || e.key === "R")) return true;
5681
+ if (e.ctrlKey || e.metaKey) {
5682
+ const k = e.key.toLowerCase();
5683
+ if (["p", "s", "u", "j", "l", "g", "o"].includes(k)) return true;
5684
+ }
5685
+ if (e.altKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) return true;
5686
+ if (e.key === "Backspace") {
5687
+ const t = e.target;
5688
+ const editable = t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable);
5689
+ if (!editable) return true;
5690
+ }
5691
+ return false;
5692
+ };
5693
+ document.addEventListener("keydown", (e) => {
5694
+ if (isBlockedKey(e)) {
5695
+ e.preventDefault();
5696
+ e.stopPropagation();
5697
+ }
5698
+ }, true);
5699
+ document.addEventListener("contextmenu", (e) => {
5700
+ if (!e.defaultPrevented) e.preventDefault();
5701
+ });
5702
+ })();
5667
5703
  var baseTitle = APP_NAME;
5668
5704
  var lastSeenCount = 0;
5669
5705
  var badgeCount = 0;