mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Restore MarkdownEditText.focusSearch override (#4908)
This commit is contained in:
committed by
GitHub
parent
3ec965f23f
commit
4eb4692531
+7
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user