diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index a326e684a..867e19420 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -1238,6 +1238,10 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown } if (length() != 0) { + if((length() == 1 && text[0] == Constants.END_OF_BUFFER_MARKER)){ + return + } + // if the text end has the marker, let's make sure the cursor never includes it or surpasses it if ((selStart == length() || selEnd == length()) && text[length() - 1] == Constants.END_OF_BUFFER_MARKER) { var start = selStart @@ -1972,14 +1976,6 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown return super.onTextContextMenuItem(id) } } - android.R.id.selectAll -> { - return if (text.toString() == Constants.END_OF_BUFFER_MARKER.toString()) { - deleteInlineStyleFromTheBeginning() - return true - } else { - super.onTextContextMenuItem(id) - } - } else -> return super.onTextContextMenuItem(id) }