Restore MarkdownEditText.focusSearch override (#4908)

This commit is contained in:
Jorge Martin Espinosa
2025-06-20 17:24:17 +02:00
committed by GitHub
parent 43ae92831a
commit 39be607c5c

View File

@@ -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
}
}