@bobfrankston/rmfmail 1.1.202 → 1.1.203
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.bundle.js +5 -1
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +10 -2
- package/client/app.js.map +1 -1
- package/client/app.ts +10 -2
- package/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-14408 → node_modules.npmglobalize-stash-18260}/.package-lock.json +0 -0
package/client/app.js
CHANGED
|
@@ -3325,9 +3325,17 @@ document.addEventListener("keydown", (e) => {
|
|
|
3325
3325
|
e.preventDefault();
|
|
3326
3326
|
deleteSelection();
|
|
3327
3327
|
}
|
|
3328
|
-
// Ctrl+Z = pop the top of the undo stack (delete / move / flag).
|
|
3328
|
+
// Ctrl+Z = pop the top of the undo stack (delete / move / flag). Guard the
|
|
3329
|
+
// SAME way Delete does (the block above): never hijack Ctrl+Z when focus is
|
|
3330
|
+
// in a text field / contenteditable, and never while a compose overlay is
|
|
3331
|
+
// open — the editor (or the input) owns undo there. Without this guard the
|
|
3332
|
+
// mail-action undo could fire instead of an editor/text undo.
|
|
3329
3333
|
if (e.ctrlKey && e.key === "z") {
|
|
3330
|
-
|
|
3334
|
+
const t = e.target;
|
|
3335
|
+
const tag = t?.tagName;
|
|
3336
|
+
const inEditable = tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || !!t?.isContentEditable;
|
|
3337
|
+
const composeOpen = !!document.querySelector(".compose-overlay");
|
|
3338
|
+
if (!inEditable && !composeOpen && undoStack.length > 0) {
|
|
3331
3339
|
e.preventDefault();
|
|
3332
3340
|
performUndo();
|
|
3333
3341
|
}
|