Skip to content

Commit bc4fe2d

Browse files
authored
Merge pull request #425 from wordpress-mobile/issue/418-temp-fix
Disable styling of multiline text with lingering/trailing newlines.
2 parents 9436852 + bfb0f73 commit bc4fe2d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/handlers/BlockHandler.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ abstract class BlockHandler<SpanType : IAztecBlockSpan>(val clazz: Class<SpanTyp
109109

110110
companion object {
111111
fun set(text: Spannable, block: IAztecBlockSpan, start: Int, end: Int) {
112-
text.setSpan(block, start, end, Spanned.SPAN_PARAGRAPH)
112+
//TODO Super temporary fix that disables styling multiline selection with trailing/leading newlines
113+
try{
114+
text.setSpan(block, start, end, Spanned.SPAN_PARAGRAPH)
115+
}catch (e: RuntimeException){
116+
}
117+
113118
}
114119
}
115120
}

0 commit comments

Comments
 (0)