FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

TextView content shifts up on every other newline character input · Issue #6863 · NativeScript/NativeScript · GitHub

TextView content shifts up on every other newline character input #6863

Description

Environment

  • CLI: 5.1.1
  • Cross-platform modules: 5.1.2
  • iOS Runtime: 5.1.1

Describe the bug
iOS TextView content shifts up and gets partially clipped on every other newline character input

To Reproduce

  1. Input some text
  2. Input newline -- textview resizes properly but content shifts up and gets partially clipped
  3. Input newline -- textview resizes properly and content offset is OK -- content visible

Expected behavior
Textview should not exhibit alternating behavior on inputing newline -- content should always be visible

Sample project
Playground project: https://play.nativescript.org/?template=play-tsc&id=c8e1hS&v=2

Additional context
The cause of the problem is described here:

The problem is that UITextView's scroll animation and your frame setting action were happened at the same time. UITextView internally scrolls the texts you currently typing to visible when typed one more character at the end of the line or typed the new line character. But the scroll animation does not need because you are expanding the textview. Unfortunately we can't control textview's internal scroll action so the text scrolls to the top of the expanded textview weirdly. And that weird scroll makes unnecessary bottom padding too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL