gcanti / tcomb-form-native

Forms library for react-native
MIT License
3.14k stars 457 forks source link

Wrong writting cursor position on multiline field (Android only). #440

Open laranicolas opened 6 years ago

laranicolas commented 6 years ago

Version

"react": "16.0.0" "react-native": "0.50.3" "tcomb-form-native": "^0.6.11"

Expected behaviour

I would expect writting cursor be on the top of TextInput (as happened on iOS).

form2

Tell us what should happen

I have a form with a multiline field and I used below code to build it:

var options = {
  fields: {
    comment: {
      label: 'Describe the type of Lead (optional)',
      multiline: true,
      stylesheet: {
          ...Form.stylesheet,
          textbox: {
              ...Form.stylesheet.textbox,
              normal: {
                  ...Form.stylesheet.textbox.normal,
                  height: 150
              },
              error: {
                  ...Form.stylesheet.textbox.error,
                  height: 150
              }
          }
      }
    }
  }
}

Appearance shows as textarea but the writting cursor (only on ANDROID) appear on the middle.

SeuZeRicardo commented 6 years ago

I have the same issue.

React-Native: 0.41
React: 15.4.2
Native-Base: 2.1.3

and testing on Android 7.0

I was looking at the documentation and found the text style props textAlignVertical, but doesn´t work to me.

See the docs here

VladimirZyuzin commented 6 years ago

The same problem. Android 6.0. I think it's not the position cursor issue. Multiline parameter doesn´t work. Thereis only one visible line in the centre of textinput.

fengyibo commented 6 years ago

` const options = { label: 'abc', multiline: true,

  stylesheet: {
    Form.stylesheet,
    textbox: {
      Form.stylesheet.textbox,
      normal: {
        Form.stylesheet.textbox.normal,
        height: 150,
        textAlignVertical: 'top',
      },
      error: {
        Form.stylesheet.textbox.error,
        height: 150,
      },
    },
  },
};`