Browse Source

Merge pull request #1739 from kaishuu0123/fix/drawiomodal-is-not-opened-when-editing-blank-page

Fix #1738: Bug: DrawioModal is not opened when editing blank page
Yuki Takei 6 years ago
parent
commit
25e7bc41c5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/client/js/components/PageEditor/MarkdownDrawioUtil.js

+ 4 - 1
src/client/js/components/PageEditor/MarkdownDrawioUtil.js

@@ -83,7 +83,10 @@ class MarkdownDrawioUtil {
    * return boolean value whether the cursor position is in a drawio
    * return boolean value whether the cursor position is in a drawio
    */
    */
   isInDrawioBlock(editor) {
   isInDrawioBlock(editor) {
-    return (this.getBod(editor) !== this.getEod(editor));
+    const bod = this.getBod(editor);
+    const eod = this.getEod(editor);
+
+    return (JSON.stringify(bod) !== JSON.stringify(eod));
   }
   }
 
 
   /**
   /**