Fix back-to-cancel behavior of editor
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user