Skip to content

fix: KeyboardChatScrollView crash on unmount - #1579

Merged
kirillzyusko merged 2 commits into
mainfrom
fix/keyboard-chat-scroll-view-crash
Aug 3, 2026
Merged

fix: KeyboardChatScrollView crash on unmount#1579
kirillzyusko merged 2 commits into
mainfrom
fix/keyboard-chat-scroll-view-crash

Conversation

@kirillzyusko

@kirillzyusko kirillzyusko commented Aug 3, 2026

Copy link
Copy Markdown
Owner

📜 Description

Fixed a crash when cleaning up handlers for unmounted view.

💡 Motivation and Context

The regression has been introduced in #1209

Before we were storing an arrays of ids. In new PR we started to retrieve view id on demand (when it's unmounted). But when view is getting unmounted, then we may not be able to retrieve its data which will lead to the crash.

So in this PR I partially restore the old behavior - we also store the data in closure (variable defined outside of function). It fixes a crash. I also added unit tests to avoid problems in the future.

Closes #1577

📢 Changelog

JS

  • don't read viewTag and call findNodeHandle in cleanup effect;

🤔 How Has This Been Tested?

Tested via e2e tests.

📸 Screenshots (if appropriate):

N/A

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko self-assigned this Aug 3, 2026
@kirillzyusko kirillzyusko added 🎯 crash Library triggers a crash of the app KeyboardChatScrollView 💬 Anything about chat functionality labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📊 Package size report

Current size Target Size Difference
334006 bytes 333861 bytes 145 bytes 📈

…d in multiple components and we have edge cases which needs to be carefully checked manually every time
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

LGTM

@kirillzyusko
kirillzyusko merged commit c579a25 into main Aug 3, 2026
18 checks passed
@kirillzyusko
kirillzyusko deleted the fix/keyboard-chat-scroll-view-crash branch August 3, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎯 crash Library triggers a crash of the app KeyboardChatScrollView 💬 Anything about chat functionality tests You added or changed unit tests

Projects

None yet

1 participant