X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4e455e9d5cb47e44f6428d179c8bd257b991791a..8b83f8a0f1562b8365ccc7735a6301eba613d28c:/src/editor/modules/data/data.js?ds=sidebyside diff --git a/src/editor/modules/data/data.js b/src/editor/modules/data/data.js index 84f0af8..7488390 100644 --- a/src/editor/modules/data/data.js +++ b/src/editor/modules/data/data.js @@ -41,11 +41,14 @@ return function(sandbox) { }); var modificationFlag = true; - wlxmlDocument.on('change', function() { + var handleChange = function() { documentDirty = true; draftDirty = true; modificationFlag = true; - }); + }; + wlxmlDocument.on('change', handleChange); + wlxmlDocument.on('contentSet', handleChange); + if(window.localStorage) { window.setInterval(function() { if(modificationFlag) {