IQKeyboardManager icon indicating copy to clipboard operation
IQKeyboardManager copied to clipboard

"enableAutoToolbar" previously defaulted to true, now it defaults to false unless read first

Open dhoerl opened this issue 4 months ago • 0 comments

Describe the bug My app "SalesPro" has been using IQKeyboardManager for years. We use all default settings, and our only direct interaction with it has been to exclude a few classes.

After updating our Swift Package, the inputAccessoryView disappeared - it was as if we had: IQKeyboardManager.shared.enableAutoToolbar = false but we never even referenced that setting.

Turns out that if in AppDelegate, if I simply read that settings: let enableAutoToolbar = IQKeyboardManager.shared.enableAutoToolbar print("enableAutoToolbar:", enableAutoToolbar) That magically the inputAccessoryView appears again!

So - your last fixes caused this. Reading that setting must have side effects that cause the actual value to get set.

To Reproduce Steps to reproduce the behavior:

  1. Don't touch enableAutoToolbar
  2. Launch an App
  3. Open a view with a text field and click in it
  4. See that there is no inputAccessoryView

Expected behavior See that there is an inputAccessoryView

Versions

Xcode: 15.4 Mac OS: N/A Simulator/Device: 17.5 Simulator/Device Name: iPhone 12 Library Version: 7.2.0

Additional context Add any other context about the problem here.

dhoerl avatar Oct 17 '24 10:10 dhoerl