editor fix: source editor should also react to contentSet event
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 17 Dec 2013 16:38:38 +0000 (17:38 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 17 Dec 2013 16:38:38 +0000 (17:38 +0100)
This fixes source editor not reloading its content after revert.

src/editor/modules/sourceEditor/sourceEditor.js

index 420abc1..1930939 100644 (file)
@@ -49,6 +49,9 @@ return function(sandbox) {
             wlxmlDocument.on('change', function() {
                 documentIsDirty = true;
             });
+            wlxmlDocument.on('contentSet', function() {
+                documentIsDirty = true;
+            });
         },
         getDocument: function() {
             return editor.getValue();