Nativescript Textview multiline select scroll not working properly

121 Views Asked by At

When creating a long string of text using a TextView on iOS and exceeding the height of the TextView it will allow you to scroll. After scrolling back up to the top of the textview and selecting a piece of text my caret position is not correctly set and my textview will not scroll to the "tapped" position. This is probably caused by the overlapping keyboard.

I set up an easy to test template which is:


    <template>
      <Page backgroundColor="#6B00D4" backgroundSpanUnderStatusBar="true" actionBarHidden="true" class="page">
        <GridLayout rows="auto">
          <TextView row="0" height="auto"/>
        </GridLayout>
      </Page>
    </template>

How will I be able to get the correct position when tapping on a piece of text?

EDIT: Just found out it only seems to happen on iOS 14

EDIT 2: The scroll position isn't used when positioning the caret, that's why the caret position seems off from the user tap position

EDIT 3: Seems to be a native iOS 14 issue: https://developer.apple.com/forums/thread/662056

0

There are 0 best solutions below