Toolbar disappears from SwiftUI TextField after a popup is closed
まだ誰も着手していません。
評価
調査の方向性
Start by tracing how IQKeyboardToolbarManager attaches and restores its toolbar for a SwiftUI TextField hosted in UIHostingController, then compare that lifecycle with UIKit during modal dismissal. Reproduce the reported sequence on iOS 26.6.1 with IQKeyboardManagerSwift 8.0.3 and inspect relevant toolbar tests or notifications. Done when the toolbar remains visible after dismissal and the number pad can still be closed.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In a SwiftUI screen, I tap a text field and the toolbar with the Done button shows above the keyboard as expected.
Then a popup opens while I'm typing, and the keyboard hides. When I close the popup, the keyboard comes back with the toolbar, but after a split second the toolbar disappears. The Done button is gone, and with a number pad there's no way to close the keyboard.
The toolbar only comes back if I close the keyboard some other way and tap the text field again.
This doesn't happen on UIKit screens. Only SwiftUI text fields lose the toolbar.
To Reproduce
Steps to reproduce the behavior:
- Enable the toolbar:
IQKeyboardToolbarManager.shared.isEnabled = true - Show a SwiftUI view with a
TextFieldinside aUIHostingController - Tap the
TextField. IQ's toolbar appears - While the field is still editing, present a modal view controller over the screen (we use a custom-presented popup). The keyboard hides, but the field stays first responder
- Dismiss the modal
- See error: the keyboard comes back with the toolbar, then the toolbar disappears a moment later. It stays gone until the user ends editing and taps a field again
Expected behavior
The toolbar stays visible after the modal is dismissed
Screenshots
Demo Project
Versions
Xcode: 26.3
Mac OS: 26.5
Simulator/Device: iOS 26.6.1
Simulator/Device Name: iPhone 13
Library Version: IQKeyboardManagerSwift 8.0.3, IQKeyboardToolbarManager 1.1.6 (IQKeyboardToolbar 1.1.5, IQKeyboardCore 1.0.9, IQTextInputViewNotification 1.0.9)
Additional context
UIDesignRequiresCompatibility = YES
- 主要言語
- Swift
- スター
- 16.6k
- フォーク
- 2.4k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hackiftekhar/IQKeyboardManager のほかの issue
-
Xcode 27 Updateオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hackiftekhar/IQKeyboardManager#2184 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
hackiftekhar/IQKeyboardManager#2185 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
hackiftekhar/IQKeyboardManager#2182 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hackiftekhar/IQKeyboardManager#2181 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
hackiftekhar/IQKeyboardManager#2180 · コメント 1 件 ·
hackiftekhar/IQKeyboardManager の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
eliasstravik/herdr-projects#789 · コメント 1 件 ·
-
follow-up needs-triage S3: minor
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
manaflow-ai/cmux#38032 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
arkavo-org/ArkavoKit#70 ·
メンテナーはふだん 1 日以内に返信
-
fix(cli): usage silently ignores unknown --provider values対応中かも @harjothkhara が今日担当しました。 オープンclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
steipete/CodexBar#5017 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] mo clean deletes Cypress test runner binaries in ~/Library/Caches/Cypress対応中かも @viniciusdsandrade が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信