Skip to content

fix: wrong onEnd event on Samsung devices when keyboard gets shown after interactive dismissal#1240

Merged
kirillzyusko merged 1 commit intomainfrom
fix/wrong-on-end-event-on-android-samsung
Dec 12, 2025
Merged

fix: wrong onEnd event on Samsung devices when keyboard gets shown after interactive dismissal#1240
kirillzyusko merged 1 commit intomainfrom
fix/wrong-on-end-event-on-android-samsung

Conversation

@kirillzyusko
Copy link
Copy Markdown
Owner

@kirillzyusko kirillzyusko commented Dec 12, 2025

📜 Description

Fixed wrong event for "end" keyboard movement after interactive dismissal (when keyboard gets shown after interaction).

💡 Motivation and Context

Originally reported by @pioner92 months ago and later raised as an issue by @iankberry

It's a known issue that in onEnd we may get out-of-dated keyboard frame metrics. The fix that I used earlier was postponing the event a little bit if it was interactive dismissal. It fixed the issue for my pixel device in #814

However if we test Samsung device we can clearly see that the bug is reproducible again. In this PR I'm continue to use the idea introduced in #814 and just use larger delay. It fixes the problem, but I'll conduct an exploration for a better/more synchronous code. I started this investigation in #1017 and I plan to return to this PR soon 👀 (but for now we'll merge a workaround)

Closes #1238

📢 Changelog

JS

  • added onEnd handler in "Interactive Keyboard" example

Android

  • added UIThread constants;
  • use .postDelayed() instead of .post() with one frame delay;

🤔 How Has This Been Tested?

Tested manually on Samsung S25+, Android 15 (Remote test lab) in example app.

📸 Screenshots (if appropriate):

Before After
Screen.Recording.2025-12-12.at.11.31.24.mov
Screen.Recording.2025-12-12.at.11.26.58.mov

📝 Checklist

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

@kirillzyusko kirillzyusko self-assigned this Dec 12, 2025
@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific 👆 interactive keyboard Anything related to interactive keyboard dismissing labels Dec 12, 2025
@kirillzyusko kirillzyusko changed the title fix: wrong onEnd event on Samsung devices when keyboard gets shown … fix: wrong onEnd event on Samsung devices when keyboard gets shown after interactive dismissal Dec 12, 2025
@github-actions
Copy link
Copy Markdown
Contributor

📊 Package size report

Current size Target Size Difference
230358 bytes 230197 bytes 161 bytes 📈

@kirillzyusko kirillzyusko added the example Anything related to example project label Dec 12, 2025
@kirillzyusko kirillzyusko marked this pull request as ready for review December 12, 2025 16:14
@kirillzyusko kirillzyusko merged commit acbc7ae into main Dec 12, 2025
24 checks passed
@kirillzyusko kirillzyusko deleted the fix/wrong-on-end-event-on-android-samsung branch December 12, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 android Android specific 🐛 bug Something isn't working example Anything related to example project 👆 interactive keyboard Anything related to interactive keyboard dismissing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Incorrect lifecycle events emitted during an aborted interactive keyboard dismisal

1 participant