Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X
[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.
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Light brightness gets intense until the 'Lightmap Encoding' quality is changed when baking Lightmap
- Crash on LinearCollectionField::LinearCollectionField after a 'm_ArrayField != SCRIPTING_NULL' assertion when opening a project
- Import Activity Window takes long time to open
- [Android] Artifacts appear in texture Preview Window on Android Platform when selected Override ETC2 fallback is 16-bit
- Child Canvas' Sorting Layer is changed to the same value as the parent Canvas after interacting with Dropdown UI object