Skip to content

Fix keyboard toggle flicker on iOS#466

Merged
migueldeicaza merged 1 commit intomigueldeicaza:mainfrom
alvarolb:keyboard-fix
Feb 12, 2026
Merged

Fix keyboard toggle flicker on iOS#466
migueldeicaza merged 1 commit intomigueldeicaza:mainfrom
alvarolb:keyboard-fix

Conversation

@alvarolb
Copy link
Contributor

Problem

When toggling between the system keyboard and the custom accessory keyboard on iOS using iOSAccessoryView, there was a visible flicker. The old code called resignFirstResponder() + becomeFirstResponder() which triggered a full keyboard dismiss/show animation cycle.

Fix

Replace resignFirstResponder()/becomeFirstResponder() with reloadInputViews(), which swaps the input view in place without dismissing the keyboard. This eliminates the flicker entirely.

The change is minimal: just the toggle method in iOSAccessoryView.swift.

Replace resignFirstResponder/becomeFirstResponder cycle with
reloadInputViews() wrapped in performWithoutAnimation when
switching between the standard keyboard and the custom
KeyboardView. This avoids the keyboard dismiss/show animation
that causes multiple layout passes and terminal flickering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@migueldeicaza
Copy link
Owner

Thanks, this looks good.

@migueldeicaza migueldeicaza merged commit 765e6f0 into migueldeicaza:main Feb 12, 2026
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.

2 participants

Comments