diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 2f05bcc1..64ce14dc 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -146,6 +146,10 @@ editor = { if (!is_modal) { editor._last_non_modal_path = editor.get_location_path(); } else if (editor._last_non_modal_path !== null) { + if (content.find('[data-close-modal-now]').length) { + editor.sidebar_get(editor._last_non_modal_path); + return; + } modal_close.attr('href', editor._last_non_modal_path).show(); } else { modal_close.remove(); diff --git a/src/c3nav/editor/templates/editor/graph_editing_settings.html b/src/c3nav/editor/templates/editor/graph_editing_settings.html index 6e355991..706693ee 100644 --- a/src/c3nav/editor/templates/editor/graph_editing_settings.html +++ b/src/c3nav/editor/templates/editor/graph_editing_settings.html @@ -2,7 +2,7 @@ {% load i18n %} {% include 'editor/fragment_modal_close.html' %} -