Skip to content

fix: attaching KeyboardTrackingView#1193

Merged
kirillzyusko merged 8 commits intomainfrom
fix/attaching-keyboard-tracking-view
Nov 4, 2025
Merged

fix: attaching KeyboardTrackingView#1193
kirillzyusko merged 8 commits intomainfrom
fix/attaching-keyboard-tracking-view

Conversation

@kirillzyusko
Copy link
Copy Markdown
Owner

@kirillzyusko kirillzyusko commented Nov 4, 2025

📜 Description

Fixed a problem of non working onMove handler in development builds.

💡 Motivation and Context

In #1184 I started to rely that didBecomeActive event will be caught and we can attach the view from this listener. But turns out that in dev builds we miss this event. So at the moment:

  • view hierarchy may be not ready by time of creating KeyboardTrackingView (noticeable in release versions);
  • after didBecomeActive hierarchy is ready (but we may miss this event if we subscribed later, and also we rely on sequence of Apple events and it's kind of transitive dependencies that may break at any point of time).

So I decided to re-work the approach. We attach KeyboardControllerView anyway, so I thought it's good to add a side effect in didMoveToWindow and attach our KeyboardTrackingView. For that I added optional param to attachToTopmostView method (called toWindow/window). If we pass the window then we use that param, otherwise rely on activeWindow and take rootViewController.view.

Such combination seems to solve all these issues when onMove stops working under certain conditions. Now we always pass a window reference for a first mount and don't rely on internal Apple timing and events.

Closes #1191

📢 Changelog

E2E

  • sync assets with working onMove handler on iOS 26;

iOS

  • make KeyboardTrackingView public;
  • pass toWindow/window into attachToTopmostView method;
  • pass window into attachToTopmostView from didMoveToWindow lifecycle.

🤔 How Has This Been Tested?

Tested:

  • iPhone 16 Pro, iOS 26 (XCode 16, physical device) - repro app (release/debug + cold start); ✅
  • iPhone 16 Pro, iOS 26 (XCode 16, simulator) - example app (release/debug + cold start) + Modal in separate window example; ✅
  • iPhone 16 Pro, iOS 26 (XCode 26, simulator) - example app (release/debug + cold start) + Modal in separate window example; ✅

📸 Screenshots (if appropriate):

Before (debug) After (debug) Release repro
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-11-04.at.12.32.47.mov
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-11-04.at.12.25.28.mov
ScreenRecording_11-04-2025.13-23-45_1.MP4

📝 Checklist

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

@kirillzyusko kirillzyusko self-assigned this Nov 4, 2025
@kirillzyusko kirillzyusko added 🐛 bug Something isn't working  iOS 26 Anything specific to iOS 26 labels Nov 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

📊 Package size report

Current size Target Size Difference
224654 bytes 224531 bytes 123 bytes 📈

@kirillzyusko kirillzyusko force-pushed the fix/attaching-keyboard-tracking-view branch from 27c34d9 to 65c49a8 Compare November 4, 2025 10:59
@kirillzyusko kirillzyusko added the e2e Anything about E2E tests label Nov 4, 2025
@kirillzyusko kirillzyusko marked this pull request as ready for review November 4, 2025 16:00
…eWindow` may return a wrong reference when non-transparent Modal gets shown (#1141)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This is wrong, but we know that interactive keyboard doesn't work as expected. See #1140

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This is actually a bug spotted by e2e tests that was introduced in 1.19.4. The onMove handler wasn't working, so KeyboardAwareScrollView wasn't functioning properly 😓

@kirillzyusko kirillzyusko merged commit b0e60f6 into main Nov 4, 2025
21 checks passed
@kirillzyusko kirillzyusko deleted the fix/attaching-keyboard-tracking-view branch November 4, 2025 19:02
@joacub
Copy link
Copy Markdown

joacub commented Nov 4, 2025

waiting for the rlease to release our app

@kirillzyusko
Copy link
Copy Markdown
Owner Author

@joacub the fix has been published in 1.19.5 version 🎉

kirillzyusko added a commit that referenced this pull request Jan 15, 2026
…case (#1277)

## 📜 Description

Updated e2e asset for XCode 16 + iOS 26.

## 💡 Motivation and Context

Fixing regression accidentally introduced in
#1193
But
#1161
fixes the problem 🤞

"Wow! I've been looking" message must be visible!

## 📢 Changelog

<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->

### E2E

- update `InteractiveKeyboardIsShown` asset for XCode 16 + iOS 26;

## 🤔 How Has This Been Tested?

Tested manually via this PR and locally.

## 📝 Checklist

- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
kirillzyusko added a commit that referenced this pull request Jan 16, 2026
…case (#1279)

## 📜 Description

Updated e2e asset for XCode 16 + iOS 26.

## 💡 Motivation and Context

Fixing regression accidentally introduced in
#1193
But
#1161
fixes the problem 🤞

In
#1277
I forgot to change keyboard to English-only layout 😓

"Wow! I've been looking" message must be visible!

## 📢 Changelog

<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->

### E2E

- update `InteractiveKeyboardIsShown` asset for XCode 16 + iOS 26;

## 🤔 How Has This Been Tested?

Tested manually via this PR and locally.

## 📝 Checklist

- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working e2e Anything about E2E tests  iOS 26 Anything specific to iOS 26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

now it does not work in development or testflight

2 participants