IQKeyboardManager icon indicating copy to clipboard operation
IQKeyboardManager copied to clipboard

Textview get scroll up when tap on the textview second time

Open chuenwailiew opened this issue 5 years ago • 6 comments

Describe the bug Don't know anyone face a problem that when you have a UITextView inside a UIScrollView, and the text view height is expanding according to the content and the scroll view content size will updated at the same time. The text view will get pushed up when u tap on it again.

To Reproduce Steps to reproduce the behavior:

  1. Add a text view inside a scroll view
  2. Make text view height dynamic according to content input
  3. Type long text
  4. Dismiss the keyboard
  5. Tap on the text view to become first responder
  6. Tap on the text view again and the text view will get pushed up

Screenshots ezgif com-video-to-gif

Xcode: 11.6 Mac OS: 10.15.5 Library Version: 6.5.0

chuenwailiew avatar Jul 27 '20 06:07 chuenwailiew

I'm experiencing the same issue (I have the same implementation in regards to UITextView and UIScrollView) however for me the text gets put in the correct position initially and then the scrollview gets scrolled to the top (as with you after your second tap) automatically (without the second tap).

Note: For me the UITextView is embedded in a UIStackView. That UIStackView is then embedded in the UIScrollView. The UITextView has isScrollEnabled = false. Using version 6.5.5

ezgif-1-3b291d3b0912

ndemie avatar Jul 29 '20 12:07 ndemie

same too

zhoumingwu avatar Aug 24 '20 03:08 zhoumingwu

Same problem to meet library version:6.3.0

focuswei avatar Sep 02 '20 02:09 focuswei

Same problem here Library version : 6.5.6

lebaotrung93 avatar Sep 28 '20 02:09 lebaotrung93

Any solution for this?

RvAgrawal avatar Sep 09 '21 11:09 RvAgrawal

Still having this problem.

ArtemLyksa avatar May 16 '22 16:05 ArtemLyksa

hello, any updates on this issue

razan1994alali avatar Feb 02 '23 19:02 razan1994alali

If you would like to not scroll the scrollView then you could try setting scrollview.shouldIgnoreScrollingAdjustment = true. This is library variable to ignore scrolling adjustment on that particular scrollview. I hope this would solve your cases.

hackiftekhar avatar Oct 02 '23 09:10 hackiftekhar