Merge pull request #8468 from penpot/azazeln28-issue-13315-fix-text-alignment-options

🐛 Fix text alignment options
This commit is contained in:
Alejandro Alonso
2026-02-25 13:15:13 +01:00
committed by GitHub

View File

@@ -1958,6 +1958,8 @@ export class SelectionController extends EventTarget {
this.startOffset === this.endOffset &&
this.endOffset === endNode.nodeValue?.length
) {
const paragraph = this.startParagraph;
setParagraphStyles(paragraph, newStyles);
const newTextSpan = createVoidTextSpan(newStyles);
this.endTextSpan.after(newTextSpan);
this.setSelection(newTextSpan.firstChild, 0, newTextSpan.firstChild, 0);