Skip to content

TextView scrolling and sizing issue on iOS #4733

@3rror404

Description

@3rror404

I'm experiencing some strange issues with the TextView since upgrading to N3.1.3

<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo" class="page">

    <Page.actionBar>
        <ActionBar title="My App" icon="" class="action-bar">
        </ActionBar>
    </Page.actionBar>

    <GridLayout rows="auto, auto, auto, auto, auto, auto">
        <StackLayout class="p-20" row="0">
            <Label text="Default style = scrolls out of container" class="body m-b-10" />
            <TextView hint="Add your comment..." />
        </StackLayout>

        <StackLayout class="p-20" row="1">
            <Label text="Adding border changes the height but fixes scrolling" textWrap="true" class="body m-b-10" />
            <TextView hint="Add your comment..." class="bordered" />
        </StackLayout>

        <StackLayout class="p-20" row="2">
            <Label text="border-radius = weird" class="body m-b-10" />
            <TextView hint="Add your comment..." class="bordered fixed-height border-radius" />
        </StackLayout>
        
    </GridLayout>
</Page>
@import 'nativescript-theme-core/css/core.light.css';

.page {
    background-color: #F2F2F2;
}

TextView {
    background-color: #FFF;
}

.bordered {
    border-width: 1;
    border-color: green;
}

.fixed-height {
    height: 70;
}

.border-radius {
    border-radius: 4;
}

  • The default TextView with no custom CSS scrolls out of it's bounding box when multiple lines are entered. (EDIT: I am adding a background colour to this in CSS. Removing the bg colour fixes the default state)
  • A TextView with a custom border becomes shorter than it's default state.
  • When a custom border-radius is added the whole border scrolls with the text.

ezgif com-video-to-gif

Here is the sample project used in the gif: https://github.com/3rror404/ns-textview-issues

┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component        │ Current version │ Latest version │ Information   │
│ nativescript     │ 3.1.3           │ 3.1.3          │ Up to date    │
│ tns-core-modules │ 3.1.1           │ 3.1.1          │ Up to date    │
│ tns-android      │                 │ 3.1.1          │ Not installed │
│ tns-ios          │ 3.1.0           │ 3.1.0          │ Up to date    │
└──────────────────┴─────────────────┴────────────────┴───────────────┘

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions