Skip to content

fix: update currentlyFocusedNode on focus#680

Merged
Skalakid merged 3 commits into
Expensify:mainfrom
truph01:fix/61521-update-currentlyFocusedNode-when-focus-on-input
May 26, 2025
Merged

fix: update currentlyFocusedNode on focus#680
Skalakid merged 3 commits into
Expensify:mainfrom
truph01:fix/61521-update-currentlyFocusedNode-when-focus-on-input

Conversation

@truph01

@truph01 truph01 commented May 20, 2025

Copy link
Copy Markdown
Contributor

Details

  • This PR implements the solution described in this proposal, combined with this suggestion.
  • It attempts to update the _currentlyFocusedNode when the markdown text input receives focus.

Related Issues

Expensify/App#61521

Manual Tests

  1. Go to ND
  2. Login account with more chats
  3. Tap search
  4. Scroll the page up and down
  5. Verify: In search, scrolling the page must close the keypad.

Linked PRs

Result:

Screen.Recording.2025-05-20.at.17.58.29.mov

@github-actions

github-actions Bot commented May 20, 2025

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@truph01

truph01 commented May 20, 2025

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Skalakid Skalakid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Skalakid Skalakid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some checks fail, please fix lint errors

Comment thread src/MarkdownTextInput.web.tsx Outdated

@parasharrajat parasharrajat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LG

@parasharrajat

Copy link
Copy Markdown
Member

@Skalakid Let's get this merged. Thanks.

@Skalakid Skalakid merged commit ead1df3 into Expensify:main May 26, 2025
@os-botify

os-botify Bot commented May 26, 2025

Copy link
Copy Markdown
Contributor

🚀 Published to npm in 0.1.277 🎉

const handleBlur: FocusEventHandler<HTMLDivElement> = useCallback(
(event) => {
const e = event as unknown as NativeSyntheticEvent<TextInputFocusEventData>;
RNTextInput.State.blurTextInput?.(e.target);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi, coming from Expensify/App#72458, the input lose focused when switching between tabs, and we have fixed it here #736.

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.

5 participants