Skip to content

Commit

Permalink
Enable back setSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo04 committed Jan 24, 2025
1 parent 7a189f9 commit fa5deab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1834,8 +1834,8 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
}

private fun refreshTaskListSpan(taskList: AztecTaskListSpan) {
// val selStart = selectionStart
// val selEnd = selectionEnd
val selStart = selectionStart
val selEnd = selectionEnd
val spanStart = this.editableText.getSpanStart(taskList)
val spanEnd = this.editableText.getSpanEnd(taskList)
val flags = this.editableText.getSpanFlags(taskList)
Expand All @@ -1850,7 +1850,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
refreshTaskListSpan(it)
}
this.editableText.setSpan(newSpan, spanStart, spanEnd, flags)
//setSelection(selStart, selEnd)
setSelection(selStart, selEnd)
}

private fun clearTaskListRefreshListeners() {
Expand Down

0 comments on commit fa5deab

Please sign in to comment.