Skip to content

Commit eb41f75

Browse files
committed
Revert hacky fix to inserted heading size redraw
1 parent 48b219d commit eb41f75

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/formatting/BlockFormatter.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,6 @@ class BlockFormatter(editor: AztecText,
431431
IAztecNestable.pullUp(editableText, editableText.getSpanStart(span), editableText.getSpanEnd(span), span.nestingLevel)
432432

433433
editableText.removeSpan(span)
434-
435-
// When a span with a different line height is replaced by a paragraph, the editor doesn't redraw
436-
// correctly. This is a hack to force it to redraw by adding and removing a new line after the
437-
// element.
438-
if (span is AztecHeadingSpan) {
439-
editableText.insert(spanEnd, "\n")
440-
editableText.delete(spanEnd, spanEnd+1)
441-
}
442434
}
443435
}
444436
}
@@ -863,10 +855,6 @@ class BlockFormatter(editor: AztecText,
863855

864856
HeadingHandler.cloneHeading(editableText, headingSpan, alignmentRendering, lineStart, lineEnd)
865857
}
866-
// When a span with a different line height is attached, the editor doesn't redraw correctly. This is a hack to
867-
// force it to redraw by adding and removing a new line after the element.
868-
editableText.insert(end, "\n")
869-
editableText.delete(end, end+1)
870858
}
871859

872860
private fun liftBlock(textFormat: ITextFormat, start: Int, end: Int) {

0 commit comments

Comments
 (0)