فهرست منبع

Disable bracket matching to fix rendering bug with IME composition in non-Safari browsers

Shun Miyazawa 2 هفته پیش
والد
کامیت
2c615f1d11
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      packages/editor/src/client/services/use-codemirror-editor/use-codemirror-editor.ts

+ 6 - 0
packages/editor/src/client/services/use-codemirror-editor/use-codemirror-editor.ts

@@ -60,6 +60,12 @@ export const useCodeMirrorEditor = (
             dropCursor: false,
             dropCursor: false,
             highlightActiveLine: false,
             highlightActiveLine: false,
             highlightActiveLineGutter: false,
             highlightActiveLineGutter: false,
+            // Disable bracket matching to prevent a rendering bug where text
+            // visually disappears after IME composition inside brackets on
+            // non-Safari browsers (e.g. Chrome). The bracketMatching decoration
+            // (Decoration.mark) corrupts CodeMirror's DOM reconciliation when
+            // applied immediately after composition ends.
+            bracketMatching: false,
           },
           },
           // ------- End -------
           // ------- End -------
         },
         },