Skip to content

Commit ec06534

Browse files
authored
Merge pull request #2114 from Infomaniak/fix-recipient-chip
fix: Remove onFocusChange in BackspaceAwareChip because we only need focusableInTouchMode in xml for accessibility
2 parents 95b23e1 + 7540d86 commit ec06534

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

app/src/main/java/com/infomaniak/mail/ui/newMessage/BackspaceAwareChip.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package com.infomaniak.mail.ui.newMessage
1919

2020
import android.content.Context
21-
import android.graphics.Rect
2221
import android.util.AttributeSet
2322
import android.view.KeyEvent
2423
import com.google.android.material.chip.Chip
@@ -30,15 +29,6 @@ class BackspaceAwareChip @JvmOverloads constructor(
3029

3130
private var onBackspace: () -> Unit = {}
3231

33-
override fun onFocusChanged(focused: Boolean, direction: Int, previouslyFocusedRect: Rect?) {
34-
if (isInTouchMode && focused) {
35-
performClick()
36-
clearFocus()
37-
} else {
38-
super.onFocusChanged(focused, direction, previouslyFocusedRect)
39-
}
40-
}
41-
4232
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
4333
if (keyCode == KeyEvent.KEYCODE_DEL) onBackspace()
4434
return super.onKeyDown(keyCode, event)

0 commit comments

Comments
 (0)