瀏覽代碼

remove comment out

kaori 3 年之前
父節點
當前提交
dfe72262eb
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      packages/app/src/components/PageEditor/CodeMirrorEditor.jsx

+ 8 - 8
packages/app/src/components/PageEditor/CodeMirrorEditor.jsx

@@ -232,14 +232,14 @@ class CodeMirrorEditor extends AbstractEditor {
   forceToFocus() {
     const editor = this.getCodeMirror();
     // use setInterval with reluctance -- 2018.01.11 Yuki Takei
-    // const intervalId = setInterval(() => {
-    //   this.getCodeMirror().focus();
-    //   if (editor.hasFocus()) {
-    //     clearInterval(intervalId);
-    //     // refresh
-    //     editor.refresh();
-    //   }
-    // }, 100);
+    const intervalId = setInterval(() => {
+      this.getCodeMirror().focus();
+      if (editor.hasFocus()) {
+        clearInterval(intervalId);
+        // refresh
+        editor.refresh();
+      }
+    }, 100);
   }
 
   /**