@bobfrankston/rmfmail 1.1.97 → 1.1.99

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/.commitmsg CHANGED
@@ -1,15 +1,16 @@
1
- Reply scrolls to top; Ctrl+A no longer hijacked in text fields
1
+ Fix duplicate drafts (unserialized autosave) + shift-click range select
2
2
 
3
- - Reply/forward: setCursor(0) now scrolls the editor viewport to the top
4
- (editor.getWin().scrollTo(0,0)), so the caret above the quoted block is
5
- the line you're looking at instead of being left scrolled down inside
6
- the quote.
3
+ Duplicate drafts: enqueueDraftPush fired imapManager.saveDraft immediately
4
+ on every autosave (~every 2 s). An IMAP search-delete-append cycle takes
5
+ longer than that, so pushes overlapped each one's "find the stale copy"
6
+ ran before a sibling's "append", neither saw the other's new copy, and
7
+ the Drafts folder filled with dozens of duplicates. enqueueDraftPush now
8
+ serializes per draftId: one push in flight at a time, and while it runs
9
+ only the latest queued content is kept (intermediate autosaves are
10
+ superseded — fewer IMAP ops too).
7
11
 
8
- - Ctrl+A: the message-list select-all guard used `.closest(".message-list,
9
- .ml-body, body)` `body` always matches, so Ctrl+A in the search box
10
- (or any input) selected every message instead of the box's text. Now it
11
- returns early when focus is in an INPUT/TEXTAREA/SELECT/contenteditable,
12
- so Ctrl+A selects (and lets you clear) the search field normally.
13
-
14
- - docs/rmf-tiny.md: marked implemented; added a running "Known TinyMCE
15
- quirks" log (caret/scroll, link-extend, spellcheck, <p>-to-<br>).
12
+ Shift-click range select: selectRange now sets `multi-select-on` for a
13
+ multi-row range. Without it, the focusRow() call right after (drives the
14
+ viewer off the clicked row) ran its single-select sweep and wiped every
15
+ row in the range except the clicked one — a regression from the v1.1.88
16
+ highlight-desync fix.
@@ -2633,6 +2633,8 @@ function selectRange(from, to) {
2633
2633
  return;
2634
2634
  const lo = Math.min(fromIdx, toIdx);
2635
2635
  const hi = Math.max(fromIdx, toIdx);
2636
+ if (hi > lo)
2637
+ body.classList.add("multi-select-on");
2636
2638
  for (let i = lo; i <= hi; i++)
2637
2639
  rows[i].classList.add("selected");
2638
2640
  }