keymanapp / keymanapp/keyman

feat(web): accepting a suggestion mid-word should right-delete text after the caret

Open
#4,538 0 comments 0 reactions 0 assignees View on GitHub
feat web/ web/predictive-text/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

Generally speaking, when a predictive suggestion is accepted in the middle of a word, I would expect that suggestion to fully replace that word. Unfortunately... that has proven a bit tricky for now.

> Since the iOS engine is having trouble with right-deletions and a resolution is proving tricky, I've gone ahead and turned off predictive text's right-deletions for now. Instead, any suggestions accepted mid-token will insert a standard word-break afterward. (Note: this is a perfect match for the behavior of iOS's default predictive text; it doesn't right-delete.)
>
> I can simply add the right-deletion aspect as a 'feature request' for the future, allowing us to revisit it at another time.
>
> I have tried a few other approaches, and one seemed to get remarkably close much of the time... the issue being that it also gave way worse results some of the other times. So... yeah, not changing it over until it's stable.

_Originally posted by @jahorton in https://github.com/keymanapp/keyman/issues/4427#issuecomment-785693828_

Implementation for Android and on the predictive-text bootstrapping page (so, within KMW itself) seems completely ready. It's just the issue(s) on iOS that have kept this feature from launching.

----

That said, it may be worth note that, on iOS at least, the system's default provided predictive text does not have this feature; instead, all post-caret text is treated as a new text token. So... it's _possible_ that (which also matches our current 14.0 solution) is more intuitive for the average iOS user. Maybe. It's also worth noting that iOS is quite pro-active about placing the caret at word boundaries; it's actually kind of hard to place the thing mid-word, so this may be something of an edge-case on that platform.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.