Fix back-to-cancel behavior of editor

This commit is contained in:
2026-07-24 10:55:29 +02:00
parent a849474b26
commit da30bb8fc3
3 changed files with 32 additions and 22 deletions
+3 -2
View File
@@ -4,8 +4,9 @@
switch (e.key) {
case 'E':
e.preventDefault();
// replace, not assign — same reasoning as history-nav.js.
window.location.replace(window.location.pathname + '?edit');
// assign, not replace — opening the editor pushes a history
// entry so Back cancels the edit (see history-nav.js).
window.location.href = window.location.pathname + '?edit';
break;
case 'N':
e.preventDefault();