We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42d1aba commit 693d153Copy full SHA for 693d153
packages/compass-generative-ai/src/components/ai-experience-entry.tsx
@@ -171,6 +171,16 @@ ${getAIEntrySVGString()}`;
171
172
containerEl.appendChild(aiButtonEl);
173
174
+ // Workarond for https://github.com/codemirror/dev/issues/1519: codemirror
175
+ // will try to `cloneNode` the placeholder (for somewhat good reasons) which
176
+ // doesn't carry over the events we attach. There's no way to opt-out of this
177
+ // behavior, so we're just overriding cloneNode function to stop this from
178
+ // happening. This is covered by tests, so in case it stops working, we will
179
+ // know
180
+ containerEl.cloneNode = () => {
181
+ return containerEl;
182
+ };
183
+
184
return containerEl;
185
}
186
0 commit comments