dont pushState onpopstate
This commit is contained in:
parent
9fb248d35d
commit
fb91af07e0
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue