@bobfrankston/rmfmail 1.1.90 → 1.1.92

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.
@@ -218,6 +218,41 @@ export async function createTinyMceEditor(container, opts = {}) {
218
218
  // Ctrl+- for its built-in page zoom, so we have to call
219
219
  // preventDefault in the capture phase to win the race.
220
220
  // Bound below in the "init" handler once the iframe doc exists.
221
+ // Typing right after a link must not extend the link. When a
222
+ // printable character is about to be inserted with the caret
223
+ // collapsed at the very end of an <a>, hop the caret to just
224
+ // after the <a> first — otherwise contenteditable keeps
225
+ // appending into the link and the whole sentence turns into
226
+ // link text (Bob 2026-05-18: "I typed a URL but it then
227
+ // included everything else I typed in the URL text"). Covers
228
+ // autolink, pasted URLs, and hand-made links alike.
229
+ ed.on("keypress", (e) => {
230
+ if (e.ctrlKey || e.altKey || e.metaKey)
231
+ return;
232
+ const sel = ed.selection;
233
+ const rng = sel.getRng();
234
+ if (!rng || !rng.collapsed)
235
+ return;
236
+ const a = ed.dom.getParent(sel.getNode(), "a");
237
+ if (!a)
238
+ return;
239
+ // Range from the caret to just after the <a>: no text in
240
+ // it ⇒ the caret sits at the link's trailing edge.
241
+ let tail;
242
+ try {
243
+ tail = rng.cloneRange();
244
+ tail.setEndAfter(a);
245
+ }
246
+ catch {
247
+ return;
248
+ }
249
+ if (tail.toString().length > 0)
250
+ return;
251
+ const after = ed.getDoc().createRange();
252
+ after.setStartAfter(a);
253
+ after.collapse(true);
254
+ sel.setRng(after);
255
+ });
221
256
  ed.on("init", () => {
222
257
  // Engage WebView2's native spellcheck. TinyMCE's own
223
258
  // `browser_spellcheck: true` is a no-op — its code path
package/npmchanges.md CHANGED
@@ -200,3 +200,27 @@ suggestion menu instead of ours. wireSpellcheck now forces
200
200
  spellcheck="false" on the editor body (with a MutationObserver to keep
201
201
  it off), so nspell is the single source of squiggles and suggestions.
202
202
 
203
+ ## v1.1.90 — 2026-05-18
204
+
205
+ Search history records live (no-Enter) searches too
206
+
207
+ Search history only recorded on Enter, so a search typed and run
208
+ live ("Hoddie") never appeared in the history dropdown. Every executed
209
+ search is now recorded; recordSearchHistory() prunes any entry that is a
210
+ prefix of the new query, collapsing the keystroke progression ("Hod",
211
+ "Hodd") into the final term so it lands in history exactly once.
212
+
213
+ ## v1.1.91 — 2026-05-18
214
+
215
+ Fix: typing after a URL no longer swallows text into the link
216
+
217
+ In the TinyMCE editor, typing or pasting a URL auto-linked it, but the
218
+ caret stayed inside the <a>, so every following character was appended
219
+ into the link text — a whole sentence turned into one link.
220
+
221
+ rmf-tiny's adapter now has a keypress handler: when a printable key is
222
+ pressed with the caret collapsed at the trailing edge of an <a>, the
223
+ caret hops to just after the <a> first, so the new text lands outside
224
+ the link. Covers autolink, pasted URLs, and hand-made links.
225
+ (client/lib/rmf-tiny.js rebuilt from the adapter source.)
226
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/rmfmail",
3
- "version": "1.1.90",
3
+ "version": "1.1.92",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -46,7 +46,7 @@
46
46
  "@bobfrankston/msger": "^0.1.381",
47
47
  "@bobfrankston/node-tcp-transport": "^0.1.8",
48
48
  "@bobfrankston/oauthsupport": "^1.0.27",
49
- "@bobfrankston/rmf-tiny": "^0.1.11",
49
+ "@bobfrankston/rmf-tiny": "^0.1.12",
50
50
  "@bobfrankston/smtp-direct": "^0.1.8",
51
51
  "@bobfrankston/tcp-transport": "^0.1.6",
52
52
  "@capacitor/android": "^8.3.0",
@@ -126,7 +126,7 @@
126
126
  "@bobfrankston/msger": "^0.1.381",
127
127
  "@bobfrankston/node-tcp-transport": "^0.1.8",
128
128
  "@bobfrankston/oauthsupport": "^1.0.27",
129
- "@bobfrankston/rmf-tiny": "^0.1.11",
129
+ "@bobfrankston/rmf-tiny": "^0.1.12",
130
130
  "@bobfrankston/smtp-direct": "^0.1.8",
131
131
  "@bobfrankston/tcp-transport": "^0.1.6",
132
132
  "@capacitor/android": "^8.3.0",