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