Search Unity

TouchScreen Keyboard hiding my inputfield text

Discussion in 'UI Toolkit' started by areavisuale, Jun 1, 2021.

  1. areavisuale

    areavisuale

    Joined:
    Jul 23, 2015
    Posts:
    60
    Hi, I would like to create a script that move my scrollrect containing an inputfield so that my current typing position is always on top of the iOS/Android touchscreen keyboard. (for a contact form for my mobile app).
    I tried to move my scrollrect to the bottom "Onvaluechanged" of my scrollrect, but if the user modify a part in the middle of the text I don't want that the scrollrect moves to the bottom.
    Maybe a solution would be to intercept the caret position and compare it with the TouchScreenKeyboard top position, but I don't know if it's possible. Anybody already faced this problem?