@bobfrankston/rmfmail 1.1.124 → 1.1.127

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.
@@ -1111,7 +1111,7 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1111
1111
  const headerEl = document.getElementById("mv-header");
1112
1112
  const bodyEl = document.getElementById("mv-body");
1113
1113
  const attEl = document.getElementById("mv-attachments");
1114
- const sameMessage = !!currentMessage && currentAccountId === accountId && (envelope?.uuid && currentMessage.uuid ? envelope.uuid === currentMessage.uuid : currentMessage.uid === uid && (folderId === void 0 || currentMessage.folderId === folderId));
1114
+ const sameMessage = !!currentMessage && currentAccountId === accountId && (envelope?.uuid && currentMessage.uuid ? envelope.uuid === currentMessage.uuid : folderId !== void 0 && currentMessage.uid === uid && currentMessage.folderId === folderId);
1115
1115
  if (!isRetry && sameMessage && bodyEl.querySelector("iframe")) {
1116
1116
  if (envelope) {
1117
1117
  lastEnvelope = envelope;
@@ -1638,7 +1638,7 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1638
1638
  installPreviewControls(iframe);
1639
1639
  } else if (msg.bodyText) {
1640
1640
  const pre = document.createElement("pre");
1641
- pre.style.cssText = "padding: 1rem; white-space: pre-wrap; word-break: break-word; font-family: system-ui, sans-serif; font-size: 17.5px; line-height: 1.5; color: #1a1a2e; background: #fff; margin: 0;";
1641
+ pre.style.cssText = "padding: 1rem; white-space: pre-wrap; word-break: break-word; font-family: system-ui, sans-serif; font-size: 17.5px; line-height: 1.5; color: #1a1a2e; background: #fff; margin: 0; height: 100%; overflow: auto;";
1642
1642
  pre.innerHTML = linkifyText(msg.bodyText);
1643
1643
  bodyEl.appendChild(pre);
1644
1644
  } else {
@@ -7463,7 +7463,11 @@ function addComposeResizeHandles(wrapper, frame) {
7463
7463
  function sanitizeQuotedBody(msg) {
7464
7464
  const isPlainText = !msg.bodyHtml;
7465
7465
  if (isPlainText) {
7466
- const escaped = String(msg.bodyText || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r\n?/g, "\n").replace(/\n/g, "<br>");
7466
+ let escaped = String(msg.bodyText || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r\n?/g, "\n").replace(/\n/g, "<br>");
7467
+ escaped = escaped.replace(
7468
+ /(https?:\/\/[^\s<>"')\]]+)/g,
7469
+ '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>'
7470
+ );
7467
7471
  return `<div style="white-space:pre-wrap;font-family:inherit;margin:0">${escaped}</div>`;
7468
7472
  }
7469
7473
  let body = msg.bodyHtml;
@@ -8859,6 +8863,7 @@ document.addEventListener("keydown", (e) => {
8859
8863
  if (["ArrowDown", "ArrowUp", "Home", "End", "PageDown", "PageUp"].includes(e.key)) {
8860
8864
  const active = document.activeElement;
8861
8865
  if (active && (active.tagName === "INPUT" || active.tagName === "TEXTAREA" || active.tagName === "SELECT")) return;
8866
+ if (active && (active.tagName === "IFRAME" || active.closest?.("#message-viewer") || active.closest?.("#folder-tree"))) return;
8862
8867
  const body = document.getElementById("ml-body");
8863
8868
  if (!body) return;
8864
8869
  const rows = Array.from(body.querySelectorAll(".ml-row"));