Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Votes

0

Found in

2019.1

Issue ID

1332468

Regression

No

[UWP] Word suggestions aren't displayed when entering text into an InputField/TMP via SoftKeyboard

When using the Windows SoftKeyboard (TouchScreenKeyboard) to enter text, word or phrase suggestions appear along the top according to text you've just entered. Selecting one of these suggestions will auto-fills the text box with the new string and (usually) appends a space.

Currently, this doesn't work properly with UWP when entering text into a Unity InputField and/or TextMeshPro:

- Word suggestions don't appear at all
- Word suggestions initially appear but stop showing after editing previously entered text (Cut/Copy/Paste)
- Word suggestions stop showing after moving the caret and editing the middle of a text string
- Word suggestions stop showing or display erratically after backspacing
- Word suggestions don't show after focusing an InputField with text already in it
- Selecting a Word Suggestion will duplicate the first part of the word string, e.g. 'H', 'e' => "'Hello" => "HeHello" (Desktop only)

This problems occur (in some form or another) for Desktop, Surface, HoloLens, and UWP Xbox One. The specific problems that manifest differ between platforms and use-cases. That is, not all of these problem occur on all devices.

Steps:
1. Open the attached project: TouchScreenKeyboardText.zip
2. Build for UWP
3. Deploy and run the app on one of the supported devices: Desktop PC, Surface, HoloLens(2), UWP Xbox One
4. Select an InputField and enter text via the SoftKeyboard (On-Screen Keyboard)*
5. Start entering and also editing text (backspace, cut/copy paste, etc.)

Expected: Word suggestions will appear along the top bar of the keyboard and update whenever a character is entered or modified.

Actual: Word suggestions exhibit one or more of the problem listed above

*The SoftKeyboard will open automatically when InputField is focuses *only* if a physical keyboard isn't present. If a physical keyboard is connected (e.g. Desktop PC) you'll need to manually open the SoftKeybaord. Note you may have to enable the OSK within Windows Settings, and also ensure Word Suggestions setting under "Typing" is also enabled.

NOTE: Word suggestions will *NOT* appear when editing the "middle" of an existing word within the InputField. That is, when typing characters, there cannot be any non-space characters immediately after the caret (cursor). When backspacing, there cannot be any non-space characters immediately before the caret. Word suggestions aren't expected to appear if non-space characters appear immediately before/after the caret.

  1. Response avatar

    Resolution Note (fix version 2021.2):

    This is fixed for common editing scenarios for InputField and TextMeshPro on Desktop, HoloLens, and UWP Xbox One.

    However, Word Suggestions will still stop showing in some cases; mostly when editing the middle of the text string. However, this cannot be address (at this time) due to limitations with the interface between the native implementation of WinRT CoreTextEditContext API and the Unity UI controls.

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.