Page MenuHomePhabricator

[MEX] [BUG] M5 - Typing suggestions from Gboard (Android virtual keyboard) drop spaces resulting in incorrect text
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Edit a string value in MEX using an Android device
  • Type any word, then a space
  • Type a word that will get autocorrected (e.g. “cant” → “can’t” or “its” → “it’s”), then type a space to trigger the autocorrection
    • Expected: it’s still a separate word
    • Actual: it’s joined directly to the previous word without a space in between
  • Type another space, just to separate the previous problem from the next one
  • Select one of the words suggested by the keyboard, then type another word
    • Expected: the selected and the typed word are separated by a space
    • Actual: they’re joined directly together

Screencast:

I think this is the result of us being too eager with parsing the value (and therefore trimming it, stripping surrounding whitespace away) while it’s still being typed. (I couldn’t reproduce the issue on the Codex TextInput component, so I think it’s MEX-specific.)

Timebox: 4 hours
Reminder: if the bug can be resolved in the timebox, go ahead and put in a fix

Note
T250553: [CV] Don't allow / resolve double spaces in text fields is a high prio issue which is related to this topic. We should sort out this bug first and use the learnings in T250553

Event Timeline

I just noticed this can also happen on desktop. If, while typing, a Backspace or Delete keystroke results in the input having spaces at the beginning or end, then the input will be trimmed and the cursor will jump to the end:
{F71539978}
(Edit: You might have to download the video to play it properly.)

Arian_Bozorg renamed this task from [MEX] Typing suggestions from Gboard (Android virtual keyboard) drop spaces resulting in incorrect text to [MEX] [BUG] M5 - Typing suggestions from Gboard (Android virtual keyboard) drop spaces resulting in incorrect text.Jan 23 2026, 12:57 AM
Arian_Bozorg moved this task from Incoming to MEX Incoming column on the Wikidata-Omega board.

Change #1238348 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Remove .trim modifier from v-model binding

https://gerrit.wikimedia.org/r/1238348

Change #1238348 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove .trim modifier from v-model binding

https://gerrit.wikimedia.org/r/1238348