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.
- Dropdown menu covers the button when there is no space for it from below
- WebCamDevice only returns one rear-facing camera when built on Android
- Reimporting a Scripted Importer Asset when Profiler is recording will make it null
- Crash on CachedWriter::Write when building a project that has access to files being denied
- Lego tutorial does not continue when text fields are updated