`focusable(...)` does not seem to be <working as advertised>? I'm trying to make a `Box` (or `Surfac...
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