fuselibs icon indicating copy to clipboard operation
fuselibs copied to clipboard

TextInput PlaceholderText problem with TextWrapping

Open trusis opened this issue 7 years ago • 3 comments

Reported on forum

MacOS Siera High Fusetools 1.5 (build 150046) Reproduced: iPhone 7 iOs 11.2.5 and Nexus 5 Android 6.0.1

Minimal code to reproduce

<App>
  <Panel>
  <Button Alignment="CenterRight" Text="Clear" Margin="5">
      <Clicked>
          <Set text.Value="" />
      </Clicked>
  </Button>
  <TextInput Width="200" ux:Name="text" PlaceholderText="This is my very long placeholder" TextWrapping="Wrap" PlaceholderColor="#ccc" Height="50" Padding="5" >
      <Rectangle Layer="Background">
          <Stroke Width="2" Brush="#BBB" />
      </Rectangle>
  </TextInput>
</Panel>
</App>

TextWrapping on different devices get diferent result in UI. In Fusetool Studio everything looks as expected. On mobile devices TextWrapping isnt working as expected.

In Fusetools Studio:

fusetools-studio

On Android:

android

On Android 4.4.2

vlmnfavowvqk-image-1517150612581

On iPhone:

ios

trusis avatar Jan 30 '18 11:01 trusis

I believe (checked Android) that the native feature for placeholder text is being used. It'll thus render however it does on the native control. Hmm...

mortoray avatar Jan 30 '18 15:01 mortoray

I believe we had a similar issue for normal text, something with the view not being fully initialized when the text was set on it or something... @nekronos might remember more details?

kusma avatar Jan 30 '18 15:01 kusma

We have both a TextInput for single-line input and a TextView for multi-lineinput. I recall something about device compatability for the distinction. TextView doesn't support placeholders though, and TextInput I don't believe support multi-line on devices.

mortoray avatar Mar 27 '18 05:03 mortoray