Closed
Bug 878384
Opened 11 years ago
Closed 11 years ago
[keyboard] don't trigger auto-correct on period
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(b2g18 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
b2g18 | --- | fixed |
People
(Reporter: djf, Assigned: djf)
References
Details
Attachments
(1 file)
The current auto-correct implementation triggers auto-correction on period, which makes it impossible to enter abbreviations like U.S. We should match whatever Android does here, I think. Probably only auto correct after a space, but if the character before the space is a period, then ignore the period adn auto correct the word before that. And if the word before the period is just a single letter then don't auto correct it at all.
Assignee | ||
Comment 1•11 years ago
|
||
Trying this out on Android, I find that it does autocorrect on punctuation, but the auto-correction for single letters is always the letter itself (except for i->I).
And we auto-correct to words like "by CD, do, ex, FM, go, he". So I think that is the behavior I need to change to fix this bug.
Currently q, s, and z all auto correct to the word a. I'm not sure what to do about that. It seems like a useful correction most of the time, but not if the user is actually trying to type those letters by themselves.
(Actually it only makes those corrections sometimes. Other times s->so, z->za. This is just like the ch->cha or ch->VH issues described in https://bugzilla.mozilla.org/show_bug.cgi?id=860550#c11 I guess that is a separate bug I need to figure out.)
I'm not sure about q,s,z->a but I think the right behavior is that if the input is a single letter, the only suggestions that should be offered are also single letters. We still need to run the prediction engine so we get i->I (or similar in other lanaguages) but we want to allow users to enter single letters.
Since we don't have time for lots of user testing, following android here seems the safest bet for now.
Assignee | ||
Comment 2•11 years ago
|
||
The fix described is not enough. We're returning suggestions for inputs like "f.b" and auto-correcting them into "fob". So I also need to not return suggestions for inputs like that.
Assignee | ||
Comment 3•11 years ago
|
||
The issue is that '.' actually appears on the keyboard and so even though it is not valid in words, it could be a typo for N or M that are valid. That rule made sense for apostophes (before they were removed from the layout) but probably doesn't make sense for periods. So treat periods as word separator tokens like space in the wordBeforeCursor() function? I guess any punctuation character that triggers auto-correct also ought to be a word separator so we can auto-correct on the other side of it.
Assignee | ||
Comment 4•11 years ago
|
||
This patch still does autocorrection on period, but it fixes the symptom of this bug: the inability to type things like acronyms.
Assignee: nobody → dflanagan
Attachment #757698 -
Flags: review?(eshapiro)
Attachment #757698 -
Flags: review?(eshapiro) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Landed on master: https://github.com/mozilla-b2g/gaia/commit/7611662e5c5649d446b9c61cf1dfaeff51934e94
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 6•11 years ago
|
||
With the current setup I am still find it difficult to type in Acronyms without spaces since the period is still automatically changes it to another word upon entering the first or second period mark. "U.S." beccomes "Us", "a.m." become "am.", and "W.A." becomes "We.".
Tested on b2g/nightly/mozilla-central-unagi/nightly.
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/mozilla-central/rev/3c6f2394995d
Gaia: d2ad0f1a5a6be8a2d6df721ba3c2b33e037c423b
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Chris Schmoeckel from comment #6)
> With the current setup I am still find it difficult to type in Acronyms
> without spaces since the period is still automatically changes it to another
> word upon entering the first or second period mark. "U.S." beccomes "Us",
> "a.m." become "am.", and "W.A." becomes "We.".
> Tested on b2g/nightly/mozilla-central-unagi/nightly.
>
> Kernel Date: Dec 5
> Gecko: http://hg.mozilla.org/mozilla-central/rev/3c6f2394995d
> Gaia: d2ad0f1a5a6be8a2d6df721ba3c2b33e037c423b
This Gaia commit is from May 31, so you may not have been testing with the very latest.
Comment 8•11 years ago
|
||
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)
Comment 10•11 years ago
|
||
Added Keyboard Test Case #8479 - [Keyboard] Auto Correct allows for entering acronyms
Flags: in-moztrap?(cschmoeckel) → in-moztrap+
You need to log in
before you can comment on or make changes to this bug.
Description
•