Explorar el Código

filter notifyBodyChanges

Yuki Takei hace 7 años
padre
commit
3dc5dbf2f7
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      resource/js/hackmd-agent.js

+ 4 - 0
resource/js/hackmd-agent.js

@@ -88,6 +88,10 @@ function addEventListenersToCodemirror() {
 
   //// change event
   editor.on('change', (cm, change) => {
+    if (change.origin === 'ignoreHistory') {
+      // do nothing because this operation triggered by other user
+      return;
+    }
     debouncedPostParentToNotifyBodyChanges(cm.doc.getValue());
   });