Skip to content

Commit

Permalink
Refined fix to only apply to exact 0 to 1 selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
khaykov committed Nov 27, 2024
1 parent cae619e commit 3c5f72f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown

if (length() != 0) {
// do not set selection when we try to select end of buffer marker in empty editor
if ((length() == 1 && text[0] == Constants.END_OF_BUFFER_MARKER)) {
if (selStart == 0 && selEnd == 1 && (length() == 1 && text[0] == Constants.END_OF_BUFFER_MARKER)) {
return
}

Expand Down

0 comments on commit 3c5f72f

Please sign in to comment.