Skip to content

Commit c8583c9

Browse files
committed
don't enable select all for empty text
1 parent 0683d48 commit c8583c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,14 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
18911891
return super.onTextContextMenuItem(id)
18921892
}
18931893
}
1894+
android.R.id.selectAll -> {
1895+
return if (text.toString() == Constants.END_OF_BUFFER_MARKER.toString()) {
1896+
deleteInlineStyleFromTheBeginning()
1897+
return true
1898+
} else {
1899+
super.onTextContextMenuItem(id)
1900+
}
1901+
}
18941902
else -> return super.onTextContextMenuItem(id)
18951903
}
18961904

0 commit comments

Comments
 (0)