Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

TextMesh Pro Issue: Input field, rich text and IME incompatibility

Discussion in 'UGUI & TextMesh Pro' started by MarconiusDMM, Mar 17, 2020.

  1. MarconiusDMM

    MarconiusDMM

    Joined:
    Nov 24, 2017
    Posts:
    11
    1) Create an Input Field. Set Rich Text to be disabled.
    2) Start typing using IME input (such as Japanese): instead of the expected visuals, the `<u>` tag is displayed directly!
    3) After pressing Enter, the `<u>` tag disappears.

    Doing this with Rich Text enabled works fine.


    Also:
    1) Create an Input Field. Set Rich Text to be enabled.
    2) Type in some text with IME input; the text is correctly underlined.
    3) Now press Space and shift+left or right in order to highlight only PART of the IME text for conversion; this is normally supported input by the OS.
    4) The conversion works as expected, but the appearance of the underline doesn't change, which makes it impossible to tell which part is currently selected.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Already have a temporary fix for this one which will be included in Preview 8. This is a simple fix where if Rich Text is disabled it doesn't inject the <u> and </u> in the composition string.

    This fix is temporary in the sense that I need to implement a more robust / flexible solution to not only address the 2nd issue / case you present but also allow you and I to use rich text to display stuff while limiting the ability of the end user to use rich text.

    The above is why I need to implement the more robust solution but that will require a lot more changes to the Input Field so that will have to wait for the next minor release (ie. 1.6.0 / 2.2.0 and 3.1.0).

    P.S. Instead of the simple fix, I could completely remove the underline as it fails in your 2nd case. Thoughts?
     
  3. MarconiusDMM

    MarconiusDMM

    Joined:
    Nov 24, 2017
    Posts:
    11
    Thanks for the quick response.

    I'm actually just now getting a few other reports from the QA team: such as pressing Esc or clicking out of the Input Field also causes weird behaviors (exactly what seems to vary based on OS and conditions) if you were in the middle of IME editing.

    My suggestion would be to do your quick fix for preview8, so at least the basic underline part works correctly. Hiding the underline seems like a bad idea, as that would make IME input almost impossible to use, or at the very least very confusing. At least now it's usable, if somewhat buggy.
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    I'll move forward with the simple fix for Preview 8 and get the more robust fix in the next minor release.

    P.S. I do have a fix finally coming for the IME composition duplication bug on Windows when using some of the IME (Japanese Microsoft IME and Chinese Traditional Microsoft Bopomofo) which happen on change of focus in Editor text fields, UI and TMP Input Fields.