fix flickering when typing outside the live render

This commit is contained in:
JK 2026-06-04 15:08:08 +02:00
parent 57f99e33fd
commit 096e18bd3c

View file

@ -222,8 +222,7 @@ class RowLayoutWidget extends WidgetType {
eq(other: RowLayoutWidget) {
return this.widths.join("|") === other.widths.join("|") &&
this.columnsMarkdown.join("---") === other.columnsMarkdown.join("---") &&
this.sourcePath === other.sourcePath &&
this.startPos === other.startPos;
this.sourcePath === other.sourcePath;
}
toDOM() {
@ -274,8 +273,9 @@ class RowLayoutWidget extends WidgetType {
if (view) {
evt.preventDefault();
evt.stopPropagation();
const pos = view.posAtDOM(rowEl);
view.dispatch({
selection: { anchor: this.startPos },
selection: { anchor: pos },
scrollIntoView: true
});
view.focus();