Skip to content
Snippets Groups Projects
Commit 91df632f authored by Jared Hancock's avatar Jared Hancock
Browse files

pjax: Cancel autosave on navigation

parent 2a123c26
No related branches found
No related tags found
No related merge requests found
......@@ -275,6 +275,12 @@ $(function() {
cleanupRedactorElements = function() {
// Drop the added redactor_air bars
$('.redactor_air').remove();
// Cancel autosave
$('.richtext').each(function() {
var redactor = $(this).data('redactor');
if (redactor)
redactor.opts.autosave = false;
});
};
findRichtextBoxes();
$(document).ajaxStop(findRichtextBoxes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment