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

pjax: Destroy redactor boxes on PJAX navigation

parent 9b8ebe22
No related branches found
No related tags found
No related merge requests found
......@@ -273,13 +273,11 @@ $(function() {
});
},
cleanupRedactorElements = function() {
// Drop the added redactor_air bars
$('.redactor_air').remove();
// Cancel autosave
// Tear down redactor editors on this page
$('.richtext').each(function() {
var redactor = $(this).data('redactor');
if (redactor)
redactor.opts.autosave = false;
redactor.destroy();
});
};
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