Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NS 6.4 HtmlView inconsistent results on Android and iOS #8368

Closed
@felixkrautschuk

Description

@felixkrautschuk

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: 6.4.0
  • Cross-platform modules: 6.4.1
  • Android Runtime: 6.4.1
  • iOS Runtime: 6.4.0
  • Plugin(s): -

Describe the bug
According to According to #8207, the HtmlView should support new properties like color, link-color and font-size.
We want to try out the new features added to the HtmlView, so we try to style it in CSS like this:

.html-view {
    font-size: 16;
    color: #808080;
    link-color: #FF44FF;
}

While it works correctly on Android, it only works partially on iOS 12 (correct font-size and correct darkgrey text-color but it shows just the default blue link-color) and it does not work at all on iOS 13, as all the text is just black (only the font-size is set correctly). See the result in the screenshot below:

Bildschirmfoto 2020-02-22 um 15 30 36

When trying to set those properties in XML like this:

On Android and iOS 12, the color is set correctly to the darkgrey tone, but the font-size and the link-color are not set correctly. On iOS 13 none of the properties are set correctly. The text and the link is black and it has the default font-size.

Bildschirmfoto 2020-02-22 um 15 25 33

To Reproduce
Just open the sample app provided below.

Expected behavior
When setting those prperties in CSS or XML, they should be applied correctly to the HtmlView component.

Sample project
HtmlViewIssue.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions