🎉 Set DOM text editor element caret

This commit is contained in:
Aitor Moreno
2025-09-22 15:47:23 +02:00
parent 9a5efe8671
commit 7ca8bf32b2
31 changed files with 2262 additions and 1326 deletions

View File

@@ -1057,7 +1057,7 @@ export class SelectionController extends EventTarget {
fragment.children.length === 1 &&
fragment.firstElementChild?.dataset?.inline === "force"
) {
const collapseNode = fragment.lastElementChild.firstChild;
const collapseNode = fragment.firstElementChild.firstChild;
if (this.isInlineStart) {
this.focusInline.before(...fragment.firstElementChild.children);
} else if (this.isInlineEnd) {