Restore MarkdownEditText.focusSearch override (#4908)
This commit is contained in:
parent
43ae92831a
commit
39be607c5c
1 changed files with 7 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
package io.element.android.libraries.textcomposer.components.markdown
|
package io.element.android.libraries.textcomposer.components.markdown
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
import androidx.appcompat.widget.AppCompatEditText
|
import androidx.appcompat.widget.AppCompatEditText
|
||||||
|
|
||||||
internal class MarkdownEditText(
|
internal class MarkdownEditText(
|
||||||
|
|
@ -36,4 +37,10 @@ internal class MarkdownEditText(
|
||||||
onSelectionChangeListener?.invoke(selStart, selEnd)
|
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