NativeScript / theme

@nativescript/theme
https://v7.docs.nativescript.org/ui/theme
Apache License 2.0
127 stars 44 forks source link

TextView color changes to black when the field blurs. #274

Open kfisto opened 4 years ago

kfisto commented 4 years ago

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

Describe the bug This is a run-time error. When a textview loses focus, the text color is reverts to black when running on an iOS device with dark mode enabled, despite the fact that when text is entered, it shows up white. When focus is returned to the TextView, additional text does show up in light colored text, but the text already entered is still black.

To Reproduce Create an app from the angular template. Modify the home.component.html file with the following code:

<ActionBar>
    <Label text="Home"></Label>
</ActionBar>

<GridLayout rows="auto, *">
    <!-- Add your page content here -->

    <TextField row="0"></TextField>
    <TextView row="1"></TextView>

</GridLayout>

Switch the simulator or device to dark mode. Run the app.

Expected behavior The text color should be light colored regardless of whether the field is being edited or not.

Sample project

Additional context

NathanaelA commented 4 years ago

@kfisto - Can you share your package.json file; want to verify with version of themes you are using...

kfisto commented 4 years ago

This is the package.json for the sample app:

{
  "nativescript": {
    "id": "org.nativescript.tvtest",
    "tns-android": {
      "version": "6.5.0"
    },
    "tns-ios": {
      "version": "6.5.0"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "~2.3.0",
    "nativescript-angular": "~8.21.0",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.5.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@ngtools/webpack": "~8.2.0",
    "nativescript-dev-webpack": "~1.5.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "20a65d338ae8f8911087ab6615b89363f864b07b",
  "readme": "NativeScript Application"
}