Nativescript-angular: IOS textfield goes to top on second time we focus on it

Created on 27 Jan 2019  路  5Comments  路  Source: NativeScript/nativescript-angular

Environment

 {
    "nativescript": {
        "id": "org.nativescript.hivekumobilenativescript",
        "tns-android": {
            "version": "5.1.0"
        },
        "tns-ios": {
            "version": "5.1.1"
        }
    },
    "description": "NativeScript Application",
    "license": "SEE LICENSE IN <your-license-filename>",
    "repository": "<fill-your-repository-here>",
    "scripts": {
        "lint": "tslint \"src/**/*.ts\""
    },
    "dependencies": {
        "@angular/animations": "~7.0.0",
        "@angular/common": "~7.0.0",
        "@angular/compiler": "~7.0.0",
        "@angular/core": "~7.0.0",
        "@angular/forms": "~7.0.0",
        "@angular/http": "~7.0.0",
        "@angular/platform-browser": "~7.0.0",
        "@angular/platform-browser-dynamic": "~7.0.0",
        "@angular/router": "~7.0.0",
        "nativescript-angular": "~7.0.0",
        "nativescript-iqkeyboardmanager": "^1.3.0",
        "nativescript-theme-core": "~1.0.4",
        "nativescript-ui-listview": "^5.1.1",
        "nativescript-ui-sidedrawer": "~5.0.0",
        "reflect-metadata": "~0.1.10",
        "rxjs": "~6.3.0",
        "tns-core-modules": "~5.0.2",
        "zone.js": "~0.8.18"
    },
    "devDependencies": {
        "@nativescript/schematics": "~0.4.0",
        "codelyzer": "~4.5.0",
        "nativescript-dev-sass": "~1.6.0",
        "nativescript-dev-typescript": "~0.7.0",
        "nativescript-dev-webpack": "~0.18.0",
        "tslint": "~5.11.0",
        "@angular/compiler-cli": "~7.1.0",
        "@ngtools/webpack": "~7.1.0"
    },
    "readme": "NativeScript Application"
}

Describe the bug

To Reproduce

<StackLayout>
  <ScrollView #scrollview height="90%">
  </ScrollView>

  <GridLayout height="10%">
    <TextField #textfield backgroundColor="red" verticalAlignment="bottom" class="chatTextField" row="0" col="0"
      [(ngModel)]="message"></TextField>
  </GridLayout>
</StackLayout>

hear is the sample video

https://youtu.be/N0yevuwTDKY

if you want something else please tell .

ios

Most helpful comment

Hey gyes @Nickllive @simonettoa
I have fround the fix

It happened when we use text field in side drawer on the root

So i just place a gridLayout around the side drawer and its fixed

All 5 comments

hey guys @tahir-jamil @NickIliev , any news on this?

@tahir-jamil @simonettoa I am not able to reproduce the issue while using the latest tns-core-modules. I'veed iPhone X, iPhone 6 and Google Pixel for the local tests.

Here is a Playground demonstration - please do let me know if I am missing something

@NickIliev I resolved changing the layout thanks to @gogoout from this page below:

https://github.com/tjvantoll/nativescript-IQKeyboardManager/issues/42

Thanks for your quick reply

@tahir-jamil please do let me know if you are still experiencing this one and check the Playground to see if there are changes that have to be made to make this issue reproducible.

Closing the issue, but I will reopen this one if the solution used by @simonettoa is still not working for you.

Hey gyes @Nickllive @simonettoa
I have fround the fix

It happened when we use text field in side drawer on the root

So i just place a gridLayout around the side drawer and its fixed

Was this page helpful?
0 / 5 - 0 ratings