Skip to content

Conversation

@bernhardoj
Copy link
Contributor

Details

This happens after this #680. In that PR, we want to save the focused text input as outlined in the proposal Expensify/App#61521 (comment), so that Keyboard.dismiss will work on live markdown. But since we can't directly access the text input state, we do it through RNTextInput.State.focusTextInput on focus and RNTextInput.State.blurTextInput on blur.

When we switch tabs, the input onBlur is triggered, so the input is blurred. In normal cases, the input doesn't lose focus even though onBlur is called when switching tabs.

Related Issues

Expensify: Expensify/App#72458

Manual Tests

  1. Open Web example
  2. Focus on the input
  3. Switch to another tab
  4. Go back to the example tab
  5. Verify the input is still focused
web.mp4

Linked PRs

@cead22
Copy link

cead22 commented Oct 31, 2025

@jmusial bump on this review please

@jmusial
Copy link
Collaborator

jmusial commented Oct 31, 2025

@cead22 sorry, was OOO, looking now

Copy link
Collaborator

@jmusial jmusial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :feelsgood:

Thank you for the fix !

Do you need to do anything else here or can I merge?

@bernhardoj
Copy link
Contributor Author

@jmusial nope. You can merge this one.

@cead22 cead22 merged commit 3fd9b3c into Expensify:main Oct 31, 2025
8 checks passed
@os-botify
Copy link
Contributor

os-botify bot commented Oct 31, 2025

🚀 Published to npm in 0.1.312 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants