diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index c55368cd..aab2c1d4 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -93,14 +93,12 @@ editor = { editor._sidebar_loaded(); history.replaceState({}, '', location_path); window.onpopstate = function() { - editor.sidebar_get(editor.get_location_path()); + editor.sidebar_get(editor.get_location_path(), true); }; }, - sidebar_get: function(location) { + sidebar_get: function(location, no_push) { // load a new page into the sidebar using a GET request - if ($('#sidebar').find('.content').html() !== '') { - history.pushState({}, '', location); - } + if (!no_push) history.pushState({}, '', location); editor._sidebar_unload(); $.get(location, editor._sidebar_loaded).fail(editor._sidebar_error); },