There seems to be a bug in the new compose <-&g...
# compose-android
v
There seems to be a bug in the new compose <-> view focus movement interop, notably the coordinates provided to
AndroidComposeView.requestFocus
and subsequent callbacks like
onFocusChanged
receive incorrect coordinates. Expected behaviour would be to use the coordinates of the View that previously had focus, but instead now the coordinates seem to be of the parent ComposeView root focus node 🤔 This breaks focus movement in cases where the coordinates of nested views and compose layout nodes overlap as the focus search does not find candidates properly. Notably, the
focusedChild
is not taken in to account in the calculation of
focusedRect
here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]i/viewinterop/FocusGroupNode.android.kt;l=97?q=focusgroupnode I will create a tracked issue soon-ish and take into account any discussion that happens here
The new
onExit
interop handler also seems to be incorrectly ran when manually moving focus elsewhere