`focusable(...)` does not seem to be <working as a...
# compose
d
focusable(...)
does not seem to be working as advertised? I'm trying to make a
Box
(or
Surface
- I'm not fussy 😁) be focusable so have modified it to: • be
.focusable(true)
• have a
focusOrder(myFocusRequester)
Documentation suggests this is all we need for a custom composable to be focused, and yet, when I call
requestFocus()
on my `Box`'s focus requester, the previously focused component (a regular
TextField
) does not appear to 'let go' of it's focus, also TalkBack does not shift it's highlight to the
Box
component. What else do I need to do to effect a full transfer of focus over to my custom component?
r
Make sure you're putting the
focusOrder
first, that's gotten me a couple of times.
🙏 1
👀 3
🙏 1
d
...that was it. @rnett thank you!
This feels like such an obvious gotcha for devs trying to use these two modifiers in combination; it really would be quite easy to include in the API comments. Not proud to admit this probably cost me a day 😞
👍 2
🤗 1