Description
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):
- CLI:
- Cross-platform modules:
- Android Runtime: 6.5.1
- iOS Runtime: 6.5.1
- Plugin(s):
Describe the bug
If you enter (focus) a text field, the ios variant will reload the text defined in the property. This is different behavior to the android version where this does not happen. Basically I am using both text
and formattedText
property of the text view. By pressing a button I am using the user input from text
and adding some formatting to it. This works fine on Android. On iOS since both properties are set, every time the text view is focused, the text from formattedText
is reloaded thus clearing the user input if the button was not pressed.
I don't see the point why this is implemented like this on iOS and I think it can be removed to match the behavior of Android. See https://github.com/NativeScript/NativeScript/blob/master/nativescript-core/ui/text-view/text-view.ios.ts#L33
To Reproduce
- Open the playground app
- Type something in the text view
- Close the text view
- Focus the text view again -> text from before disappears
Expected behavior
Try the same on Android -> text does not disappear
Sample project
https://play.nativescript.org/?template=play-vue&id=lVTKFT
Additional context