Closed Bug 878387 Opened 11 years ago Closed 11 years ago

[keyboard] minimize deletions and insertions for corrections

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g18 fixed)

VERIFIED FIXED
Tracking Status
b2g18 --- fixed

People

(Reporter: djf, Assigned: djf)

References

Details

Attachments

(2 files)

If we can't get bug 861515 uplifted to v1-train, then we should modify the auto-correction algorithm to minimize the backspaces and characters it needs to send to do a correction. Currently we backspace all the way to the start of the word and re-type it with a correction. But we should only backspace as far as the first changed letter. This should make a noticeable difference in the perceived speed of the corrections.

I've also seen a suggestion (but can't find the bug now that suggested it) that we use the MozKeyboard API function for setting a selection region instead of backspacing. I don't know if that is implemented. If so, then I should use that.
Depends on: 797170
We can't use the selection range in v1-train afaik. Is not in b2g18.
Blocks: 797170
No longer depends on: 797170
Jan,

This is the bug we discussed by email. The patch also fixes two related bugs: 878168 and 876891.
Attachment #757291 - Flags: review?(janjongboom)
Assignee: nobody → dflanagan
I added some comments on the GH PR.
Attachment #757291 - Flags: review?(janjongboom) → review-
Use replaceSurroundingText is even faster, yay!
Attachment #757412 - Flags: review?(dflanagan)
Attachment #757291 - Flags: review- → review?(janjongboom)
Attachment #757291 - Flags: review?(janjongboom) → review+
r=me. Landed in https://github.com/mozilla-b2g/gaia/commit/6ca1a9b1f327047697ab409e7e13bccd1d0a887a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Auto Correction has been updated so that pressing delete only once after an auto correction returns user to the place they were when Auto Correction was performed. It is now much easier and quicker to correct an Auto Correction mistake. 
Tested on b2g/nightly/mozille-central-unagi/latest.

Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/mozilla-central/rev/3c6f2394995d
Gaia: d2ad0f1a5a6be8a2d6df721ba3c2b33e037c423b
Status: RESOLVED → VERIFIED
Blocks: 879533
Please add a testcase for this bug to moztrap for 1.1 testsuite.  If yes, mark this in-moztrap+ when completed.  If not, mark this in-moztrap-.
Flags: in-moztrap?(cschmoeckel)
Uplifted to v1-train in bug 873934
Minimalized deletions for Auto Correct is tested in Keyboard Suite Test Case #8446 - [Keyboard] Pressing the Backspace button immediately after a word suggestion reverts the changes
Flags: in-moztrap?(cschmoeckel) → in-moztrap+
Attachment #757412 - Flags: review?(dflanagan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: