mirror of
https://github.com/aculix/negotium.git
synced 2026-09-11 07:28:17 +00:00
143fcc205d
Cmd/Ctrl+Z did nothing in normal use. The handler bailed out whenever the event target was an input, which was meant to protect the field's own text undo. But the add-task input is where focus usually sits: you click it to add a task and stay there, and on macOS clicking a button doesn't move focus. So the guard killed undo in the one situation it exists for, right after deleting something. It now defers to the field only when the field actually holds text. An empty input has nothing to restore. The decision moves to src/lib/shortcuts.js as a pure function, because the inline version couldn't be tested. Shift+Cmd+Z means redo and no longer triggers an undo.