Restore MarkdownEditText.focusSearch override (#4908)
This commit is contained in:
parent
3ec965f23f
commit
4eb4692531
1 changed files with 7 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
package io.element.android.libraries.textcomposer.components.markdown
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import androidx.appcompat.widget.AppCompatEditText
|
||||
|
||||
internal class MarkdownEditText(
|
||||
|
|
@ -36,4 +37,10 @@ internal class MarkdownEditText(
|
|||
onSelectionChangeListener?.invoke(selStart, selEnd)
|
||||
}
|
||||
}
|
||||
|
||||
// When using the EditText within a Compose layout, we need to override focusSearch to prevent the default behavior
|
||||
// Otherwise it can try searching for focusable nodes in the Compose hierarchy while they're being laid out, which will crash
|
||||
override fun focusSearch(direction: Int): View? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue