Skip to content

TextInput border showing on Android but not in web browser #184

@gianluca-nitti

Description

@gianluca-nitti

I'm trying to use styles to add borders around components, and I'm testing on Android and web browser (mainly Chrome). When using the TextInput component, the border is correctly rendered on Android but not in browser. Also, if I recall correctly, this was working correctly before updating ReactXP from 0.42.0_rc.9 to 0.42.0_rc.21.

Here is an example code snippet of a render() method to reproduce the issue:

public render() {
    const s = RX.Styles.createViewStyle({borderColor: "red", borderWidth: 1, borderStyle: "solid"});
    return (
      <RX.View>
      <RX.Text style={s}>text</RX.Text>
      <RX.TextInput style={s} value="textInput"/>
    </RX.View>
    );
}

This is the result on Android (border working both for Text and TextInput):
android
and this on a web browser (border correctly shown for Text, but not for TextInput):
browser

I tried to inspect the page a bit and I found that the generated input tag has the border style attribute set to none but I can't figure out why.
image
If I manually manipulate the inline CSS in the generated HTML using the browser's dev tools, for example by changing border: none to border: solid I can get a border, but I found no way to make ReactXP generate the correct style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions