Search Issue Tracker

Fixed

Fixed in 6000.0.27f1, 6000.1.0a4, 7000.0.0a10

Votes

14

Found in

2021.3.38f1

2022.3.29f1

6000.0.3f1

7000.0.0a1

Issue ID

UUM-72689

Regression

Yes

[TMP][Android] Writing text or adding more emojis after an emoji in the InputField causes the first emoji to disappear and be changed to two question marks when "Hide Mobile Input" is enabled on some Android devices

--

-

How to reproduce:
1. Open the “IN_76747” project
2. Open the “SampleScene”
3. In the Build Settings add opened scene and in the “Run Device” dropdown select the desired device
4. Build And Run
5. In the player type in two emojis into “Without Input” InputField

Expected result: Two emojis visible in the InputField
Actual result: Second emoji is encapsulated in two question marks and the first emoji disappears

Reproducible with: Text Mesh Pro 3.2.0-pre.4, 3.2.0-pre.9 (2021.3.38f1, 2022.3.29f1), Unity UI 2.0.0, 3.0.0-exp.3 (6000.0.3f1)
Not reproducible with: Text Mesh Pro 3.2.0-pre.3 (2021.3.38f1, 2022.3.29f1)

Testing environment: Windows 10 Pro
Not reproducible on: No other environment tested

Reproducible on these devices:
VLNQA00410, Samsung Galaxy Z Fold3 5G (SM-F926U), Android 11, CPU: Snapdragon 888, GPU: Adreno (TM) 660
VLNQA00267, Samsung Galaxy S10+ (SM-G975F), Android 12, CPU: Exynos 9 (9820), GPU: Mali-G76
VLNQA00363, Samsung Galaxy Z Fold2 5G (SM-F916B), Android 11, CPU: Snapdragon 865 SM8250, GPU: Adreno (TM) 650
VLNQA00611, Samsung Galaxy S24 Ultra (SM-S928B), Android 14, CPU: Qualcomm SM8650-AB Snapdragon 8 Gen 3, GPU: Adreno (TM) 750
VLNQA00521, Samsung Galaxy S22 Ultra (SM-S908U), Android 14, CPU: Snapdragon 8 Gen 1 (SM8450), GPU: Adreno (TM) 730
VLNQA00321, Xiaomi MI 9 (MI 9), Android 10, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640

Not reproducible on these devices:
VLNQA00357, iPhone 12 Mini

Notes:
- Also reproducible if the second entered character is not emoji.
- Not reproducible if “Hide Input Field” is enabled
- Regression happened in the Text Mesh Pro 3.2.0-pre.4 package
- Not reproducible on the iOS and Windows Standalone Platform

  1. Resolution Note (fix version 6000.1.0a4):

    Fixed issue with emojis in TextField on mobile.

  2. Resolution Note (fix version 6000.0.27f1):

    Fixed issue with emojis in TextField on mobile.

Comments (12)

  1. nadav-kooply

    Jul 02, 2024 12:15

    It looks like the error is related to the following lines in the TMP_InputField class:

    // On iOS/tvOS we always have TouchScreenKeyboard instance even when using external keyboard
    // so we keep track of the caret position there
    else if (m_HideMobileInput && m_SoftKeyboard != null && m_SoftKeyboard.canSetSelection &&
    Application.platform != RuntimePlatform.IPhonePlayer && Application.platform != RuntimePlatform.tvOS)
    {
    var selectionStart = Mathf.Min(caretSelectPositionInternal, caretPositionInternal);
    var selectionLength = Mathf.Abs(caretSelectPositionInternal - caretPositionInternal);
    m_SoftKeyboard.selection = new RangeInt(selectionStart, selectionLength);
    }

    When I comment out these lines emojis work properly on android but changing the caret position by tapping the text doesn't work anymore.

  2. syoels

    Jun 16, 2024 12:28

    Hey, any updates on this? I'm experiencing the same issue - can't type consecutive emojis in an input field without them getting completely messed up and wondering when this may be resolved.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.