Search Unity

TextMeshPro - Input field - UWP - Input field is not working correctly in uwp build

Discussion in 'UGUI & TextMesh Pro' started by Micito, Apr 26, 2018.

  1. Micito

    Micito

    Joined:
    Dec 5, 2014
    Posts:
    16
    Hi everyone

    We found out that text mesh pro's input field is not working correctly in UWP build (Universal Windows Platform), it happened only on devices that use touch input, maybe that has something to do with it. Also it works same with both physical and on screen keyboard.

    When you press enter, text mesh pro inserts new line twice (pictures 1->2). And when you continue typing anything, although caret is positioned in the new line, text is added on position where you pressed enter. (pictures 1->2->3)

    Apparently there is a bug in WinRT for double enter, but text mesh pro should work correctly regardless of that . Anyone has any kind of workaround?
     

    Attached Files:

  2. Roywise

    Roywise

    Joined:
    Jun 1, 2017
    Posts:
    68
    We're experiencing the same problems, I'll define them here:

    Caret Problem
    1. The caret will always stay at the end of the inputfield.
    2. Can't move the caret by clicking or tapping within the inputfield.
    Return / Enter Problem
    1. When the return key is pressed it'll add two lines, creating a whiteline between the text and the caret
    Input Problem
    1. When something is typed, the return key is pressed, something more is typed all while it's the first inputfield you've typed something into then it'll move the caret down (two lines, see Return / Enter Problem) but the lastly typed text is placed directly behind the previous typed text.
    2. When the caret is moved by the arrow keys and you type something it'll add it to the end of the inputfield, not on the caret's position.

    I've created a project that reproduces the problem. You'll have to build it yourself. You're able to download it here: https://www.dropbox.com/s/141z88b1k3yqu5t/textmesh-debug.rar?dl=0

    It's a simple scene with two InputFields, select one of the two and start typing, press enter for a newline.


    Notes:
    • It works fine in the Editor or a Windows Standalone build.
    • The problem only exists in UWP builds.
    • It seems that the problems only exists when a UWP build is run on a PC that has some kind of touch device attached. For instance, it runs fine on my local PC but when I run it on a device with a touch screen it breaks.
    • All the problems seem to persist throughout runtime, except for the Input Problem point 1; this only happens in the first inputfield that you're typing something into.
    • It doesn't matter which Scripting Backend is selected. (NET or IL2CPP)
    • It doesn't matter which Build Type is selected. (XAML or D3D)
    • We're running Unity 2017.3.0f3.
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for the detailed information. I suspect the issue isn't specific to TextMesh Pro but to the input handling which TMP relies on.

    Could you please submit a bug report with this information and make sure you label this as a UWP specific issue. I'll still take a look at it myself just in case but again I suspect we will need to UWP folks at Unity to look into this.
     
  4. Roywise

    Roywise

    Joined:
    Jun 1, 2017
    Posts:
    68
    Hi Stephan,

    A bug report has been submitted. It's labeled: (Case 1030662) InputField in UWP build when run on Windows machine with Touch device attached has issues.

    Contains most of the details that I've listed here.

    Thanks for the quick reply.
     
    Stephan_B likes this.
  5. Roywise

    Roywise

    Joined:
    Jun 1, 2017
    Posts:
    68
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I'll try looking into this over the next day or so and provide feedback there after.
     
    Roywise likes this.
  7. Roywise

    Roywise

    Joined:
    Jun 1, 2017
    Posts:
    68
    Thank you, I've already received another message saying that they expect it to have the same root cause and that's why it's labeled as a duplicate. It's being looked into, thanks.


    But we're running into some other issues with the TextMesh Pro InputFields and I'm not sure if it has been reported before. Do you want me to create a new Thread on the forum or submit a Bugreport?

    1. Selecting a Word from a sentence that's in a rotated TextMesh Pro InputField is almost impossible using a Mouse because of the input position wrong.
    2. The Rect Mask 2D seems to break when a TextMesh Pro InputField is rotated.

    Both happen in all Builds (UWP or Standalone) and I have a Reproduction Project ready.
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Please do submit a bug report with the Repro project and let me know what the case # is.
     
  9. Roywise

    Roywise

    Joined:
    Jun 1, 2017
    Posts:
    68
    It has been submitted. Case 1033636
     
    Stephan_B likes this.