Skip to content

Commit f77e576

Browse files
committed
avoid running crash preventer InputFilter for newline insertion
1 parent 28bf409 commit f77e576

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
462462
// https://android-review.googlesource.com/c/platform/frameworks/base/+/634929
463463
val dynamicLayoutCrashPreventer = InputFilter { source, start, end, dest, dstart, dend ->
464464
var temp : CharSequence? = null
465-
if (!bypassCrashPreventerInputFilter && dend < dest.length) {
465+
if (!bypassCrashPreventerInputFilter && dend < dest.length && source != Constants.NEWLINE_STRING) {
466466

467467
// if there are any images right after the destination position, hack the text
468468
val spans = dest.getSpans(dend, dend+1, AztecImageSpan::class.java)

0 commit comments

Comments
 (0)