Skip to content

fix: use weak reference to keyboard view on iOS#1465

Merged
kirillzyusko merged 1 commit into
mainfrom
fix/weak-keyboard-ref
May 15, 2026
Merged

fix: use weak reference to keyboard view on iOS#1465
kirillzyusko merged 1 commit into
mainfrom
fix/weak-keyboard-ref

Conversation

@kirillzyusko
Copy link
Copy Markdown
Owner

@kirillzyusko kirillzyusko commented May 15, 2026

📜 Description

Use weak reference to KeyboardView.

💡 Motivation and Context

The keyboard is a system view and we don't manage a lifecycle of this view. So we shouldn't try to keep a reference to it when view has been destroyed. For that we need to use weak keyword so that when keyboard instance has been destroyed we'll try to find a new instance of the keyboard.

📢 Changelog

iOS

  • use weak reference to the keyboard view in KeyboardViewLocator;

🤔 How Has This Been Tested?

Tested via e2e tests. The issue has been discovered on iOS 26.2 (there after keyboard dismissal the reference is stale and keyboard is getting re-created when it's getting shown again).

📝 Checklist

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

@kirillzyusko kirillzyusko self-assigned this May 15, 2026
@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🍎 iOS iOS specific labels May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Package size report

Current size Target Size Difference
317460 bytes 317457 bytes 3 bytes 📈

@kirillzyusko kirillzyusko marked this pull request as ready for review May 15, 2026 13:33
@github-actions
Copy link
Copy Markdown
Contributor

LGTM

@kirillzyusko kirillzyusko merged commit 1a6450e into main May 15, 2026
18 checks passed
@kirillzyusko kirillzyusko deleted the fix/weak-keyboard-ref branch May 15, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working 🍎 iOS iOS specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant