Skip to content

Commit 826b429

Browse files
committed
Increase the touching are by 10 pixels
1 parent d04a133 commit 826b429

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
733733
y += scrollY
734734

735735
// Check if we're in the task list area
736-
if (isEnabled && x + totalPaddingStart <= blockFormatter.listStyleLeadingMargin()) {
736+
if (isEnabled && x + totalPaddingStart <= (blockFormatter.listStyleLeadingMargin() + 10)) {
737737
val line = layout.getLineForVertical(y)
738738
val off = layout.getOffsetForHorizontal(line, x.toFloat())
739739
if (getTaskListHandler()?.handleTaskListClick(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.wordpress.aztec.spans.AztecTaskListSpan
88
class TaskListClickHandler(val listStyle: BlockFormatter.ListStyle) {
99
fun handleTaskListClick(text: Spannable, off: Int, x: Int, startMargin: Int): Boolean {
1010
// We want to make sure that text click will not trigger the checked change
11-
if (x + startMargin > listStyle.leadingMargin()) return false
11+
if (x + startMargin > (listStyle.leadingMargin() + 10)) return false
1212
val clickedList = text.getSpans(off, off, AztecTaskListSpan::class.java).firstOrNull()
1313
val clickedLines = text.getSpans(off, off, AztecListItemSpan::class.java)
1414
val clickedLine = clickedLines.find {

0 commit comments

Comments
 (0)