mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
Merge pull request #8468 from penpot/azazeln28-issue-13315-fix-text-alignment-options
🐛 Fix text alignment options
This commit is contained in:
commit
baa44119f4
@ -1958,6 +1958,8 @@ export class SelectionController extends EventTarget {
|
|||||||
this.startOffset === this.endOffset &&
|
this.startOffset === this.endOffset &&
|
||||||
this.endOffset === endNode.nodeValue?.length
|
this.endOffset === endNode.nodeValue?.length
|
||||||
) {
|
) {
|
||||||
|
const paragraph = this.startParagraph;
|
||||||
|
setParagraphStyles(paragraph, newStyles);
|
||||||
const newTextSpan = createVoidTextSpan(newStyles);
|
const newTextSpan = createVoidTextSpan(newStyles);
|
||||||
this.endTextSpan.after(newTextSpan);
|
this.endTextSpan.after(newTextSpan);
|
||||||
this.setSelection(newTextSpan.firstChild, 0, newTextSpan.firstChild, 0);
|
this.setSelection(newTextSpan.firstChild, 0, newTextSpan.firstChild, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user