@bobfrankston/rmfmail 1.2.195 → 1.2.196

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.
package/client/app.ts CHANGED
@@ -94,13 +94,17 @@ propagateAppName();
94
94
  if (e.key === "F5" || e.key === "F3") return true;
95
95
  if ((e.ctrlKey || e.metaKey) && (e.key === "r" || e.key === "R")) return true;
96
96
  // Browser accelerators bound to Ctrl-letter combos that mailx
97
- // doesn't want to forward: P (print), S (save page), U (view
98
- // source), J (downloads), L (focus address bar — n/a in WebView
99
- // but harmless), G (find next). Note: O is "open file" in
100
- // browsers — mailx uses Ctrl+O nowhere meaningful, so block.
97
+ // doesn't want to forward: S (save page), U (view source),
98
+ // J (downloads), L (focus address bar — n/a in WebView but
99
+ // harmless), G (find next). Note: O is "open file" in browsers —
100
+ // mailx uses Ctrl+O nowhere meaningful, so block. P is NOT here:
101
+ // mailx's own Ctrl+P handler prints the focused letter and
102
+ // preventDefaults the browser dialog itself — listing it here
103
+ // stopPropagation'd the event before that handler could run, which
104
+ // is why the print shortcut was dead (Bob 2026-07-30).
101
105
  if (e.ctrlKey || e.metaKey) {
102
106
  const k = e.key.toLowerCase();
103
- if (["p", "s", "u", "j", "l", "g", "o"].includes(k)) return true;
107
+ if (["s", "u", "j", "l", "g", "o"].includes(k)) return true;
104
108
  }
105
109
  // Alt+Left / Alt+Right = browser back / forward. No use in mailx.
106
110
  if (e.altKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) return true;
@@ -3746,13 +3750,17 @@ document.addEventListener("keydown", (e) => {
3746
3750
  openCompose("new");
3747
3751
  }
3748
3752
  // Ctrl+P = Print the focused message. preventDefault stops the host
3749
- // browser from printing the whole app window instead of the letter.
3753
+ // browser from printing the whole app window instead of the letter
3754
+ // UNCONDITIONALLY, even with focus in a text field: the WebView's
3755
+ // whole-app print dialog is never what the user wants, and ^P should
3756
+ // print the current letter regardless of where the caret sits.
3750
3757
  if (e.ctrlKey && (e.key === "p" || e.key === "P") && !e.shiftKey && !e.altKey) {
3751
- const t = e.target as HTMLElement | null;
3752
- const inText = t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable);
3753
- if (!inText) {
3754
- e.preventDefault();
3758
+ e.preventDefault();
3759
+ if (getCurrentMessage()) {
3755
3760
  printCurrentMessage();
3761
+ } else {
3762
+ const s = document.getElementById("status-sync");
3763
+ if (s) s.textContent = "Nothing to print — select a message first.";
3756
3764
  }
3757
3765
  }
3758
3766
  // Ctrl+T = new view tab. The strip is hidden with a single tab (no wasted
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-client",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/rmfmail",
3
- "version": "1.2.195",
3
+ "version": "1.2.196",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",