mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
🐛 Fix pasting adds a newline (#5763)
This commit is contained in:
parent
b913c75c41
commit
1f2e36774e
@ -1066,9 +1066,15 @@ export class SelectionController extends EventTarget {
|
||||
}
|
||||
const collapseNode = fragment.lastElementChild.lastElementChild.firstChild
|
||||
if (this.isParagraphStart) {
|
||||
const a = fragment.lastElementChild;
|
||||
const b = this.focusParagraph;
|
||||
this.focusParagraph.before(fragment);
|
||||
mergeParagraphs(a, b);
|
||||
} else if (this.isParagraphEnd) {
|
||||
const a = this.focusParagraph;
|
||||
const b = fragment.firstElementChild;
|
||||
this.focusParagraph.after(fragment);
|
||||
mergeParagraphs(a, b);
|
||||
} else {
|
||||
const newParagraph = splitParagraph(
|
||||
this.focusParagraph,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user