Anyone experiencing the following when using a `Fo...
# compose-android
e
Anyone experiencing the following when using a
FocusRequester
with Robolectric?
Copy code
FocusRequester is not initialized. Here are some possible fixes:

   1. Remember the FocusRequester: val focusRequester = remember { FocusRequester() }
   2. Did you forget to add a Modifier.focusRequester() ?
   3. Are you attempting to request focus during composition? Focus requests should be made in
   response to some event. Eg Modifier.clickable { focusRequester.requestFocus() }
r
Happened to me because I moved focus to a reference which was under a text field which was not in composition (hidden at that point). not sure how much it relates to your usecase though.