hackiftekhar / IQKeyboardManager

Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
MIT License
16.44k stars 2.4k forks source link

Multiple UITextfields in ScrollView have a scrolling offset mistake. #1829

Closed nawinest closed 2 years ago

nawinest commented 3 years ago

Describe the bug When I have multiple textfields on same scrollview, ScrollView will have mistake scrolling offset after I transpose to each textfield. (You can see on demo video)

To Reproduce Steps to reproduce the behavior:

  1. Start to select some textfield on the end of ScrollView
  2. transpose to select first textfield which can't see textfield on the end of scrollview
  3. The offset of scrollview will incorrect here. (It look like it scroll to previous selected textfield)

Expected behavior Scrolling offset must be scroll to correct position

Demo video https://user-images.githubusercontent.com/42397067/130907471-c4497741-c4fd-402b-8978-d76ee29b6b1a.MP4 According Demo video you will see. First, I entered on input11 field and after that I select on input2 but scrollview is scroll to input11 again. I have no Idea what I'm wrong because this is normal textfield in scrollview don't has any code.

Versions

Xcode: 12.5 Mac OS: Big sur 11.4 Simulator/Device: IphoneXr 14.4.2 Simulator/Device Name: IphoneXr Library Version: ~> 6.5.0

nawinest commented 3 years ago

@hackiftekhar Can you investigate this issue for us ?

hackiftekhar commented 2 years ago

I can see. Can you please share a demo project with me?

jiexishede commented 2 years ago

I meet a bug like this. Multiple UITextfield in a UITableView With Static Cells. In some cells, each cell has a UITextfield on the right part. The TableView scroll offset mistake in the fullscreen iPhone sometimes. IphoneSE2 does not show this error.

Thank you for fixing it.

Versions Xcode: 13.1 Mac OS: Big sur 11.4 Device: Iphone12 iOS14

Appdelegate.m : add IQKeyboardManager

The view controller where the bug occurs is written in Swift. The view controller is using the UIStoryboard with a static tableView cell UITabelViewController.

jiexishede commented 2 years ago

https://stackoverflow.com/questions/68933184/iqkeyboardmanager-have-an-issue-about-scrolling-offset-when-have-multiple-uitext

hackiftekhar commented 2 years ago

@jiexishede the UITableViewController have it's own logic to deal with textField so library ignore UITableViewController handling.

Steav007 commented 7 months ago

How was the issue? I got this issue on IQKeyboardManagerSwift 6.5.10.

hackiftekhar commented 1 month ago

@Steav007, are you using UITableViewController or something else?