diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index 992c6443..d63b6744 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -411,13 +411,18 @@ $(document).ready(function() { // Autosave // Autosave works when the content of the page is bigger than 100 characters + var currentContent = editorGetContent(); setInterval(function() { var uuid = $("#jsuuid").val(); var title = $("#jstitle").val(); var content = editorGetContent(); var ajax = new bluditAjax(); - // showAlert is the function to display an alert defined in alert.php - ajax.autosave(uuid, title, content, showAlert); + // Call autosave only when the user change the content + if (currentContent!=content) { + currentContent = content; + // showAlert is the function to display an alert defined in alert.php + ajax.autosave(uuid, title, content, showAlert); + } },1000*60*AUTOSAVE_INTERVAL); });