Commit 073201f
committed
fix: complete username autocomplete on tap, not just show it
Tapping an untouched or partially-typed username field now applies
the suggestion immediately, the same way pressing Enter already did,
instead of only showing the ghost-text hint.
Two bugs were stacking here: find_suggestion() returns nothing for
empty input (by design, to avoid hijacking typing as it's cleared),
so a tap on a blank field never got the field's own suggestion to
begin with. And get_suggestion_suffix() had the same empty-input
guard, so even a suggestion set directly onto current-suggestion
wouldn't have rendered — skipping 0 characters of the suggestion is
just the whole suggestion, which is exactly right to show.1 parent 2a46cda commit 073201f
2 files changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
479 | 481 | | |
480 | 482 | | |
481 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
0 commit comments