Skip to content

Fix keyboard toggle flicker on iOS#465

Closed
alvarolb wants to merge 2 commits intomigueldeicaza:mainfrom
alvarolb:main
Closed

Fix keyboard toggle flicker on iOS#465
alvarolb wants to merge 2 commits intomigueldeicaza:mainfrom
alvarolb:main

Conversation

@alvarolb
Copy link
Contributor

Summary

Replace the resignFirstResponder/becomeFirstResponder cycle in toggleInputKeyboard with reloadInputViews() wrapped in UIView.performWithoutAnimation.

The current implementation dismisses and re-shows the keyboard on every toggle, causing multiple layout passes and visible terminal flickering. Using reloadInputViews() swaps the input view in-place without the keyboard dismiss/show animation.

Changes

  • iOSAccessoryView.swift: Replaced resign/become cycle with reloadInputViews() in performWithoutAnimation

Before / After

Before: Each keyboard toggle triggers resign → keyboard dismiss animation → inputView swap → become → keyboard show animation → multiple layoutSubviews → terminal flicker

After: Input view swaps instantly, no animation, no flicker

@alvarolb alvarolb force-pushed the main branch 5 times, most recently from 6abe995 to 3f38c5f Compare February 11, 2026 21:20
@migueldeicaza
Copy link
Owner

You mixed up two commits.

alvarolb and others added 2 commits February 12, 2026 01:10
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>
@alvarolb
Copy link
Contributor Author

Closing to resubmit with a clean single commit (removing unrelated cherry-picked changes).

@alvarolb alvarolb closed this 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.

3 participants

Comments