We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb7028e commit 8e097e1Copy full SHA for 8e097e1
1 file changed
src/extensions/codemirror/CodeMirror.tsx
@@ -304,8 +304,8 @@ export const CodeEditor = ({
304
if (onSelection)
305
onSelection(v.state.selection.ranges.filter((r) => !r.empty).map(({ from, to }) => ({ from, to })));
306
307
- if (onFocusChange && intent && !v.view.dom.className?.includes(`${eccgui}-intent--${intent}`)) {
308
- v.view.dom.className += ` ${eccgui}-intent--${intent}`;
+ if (onFocusChange && intent && !v.view.dom.classList?.contains(`${eccgui}-intent--${intent}`)) {
+ v.view.dom.classList.add(`${eccgui}-intent--${intent}`);
309
}
310
311
if (onCursorChange) {
0 commit comments