Closed Bug 881239 Opened 11 years ago Closed 11 years ago

[Keyboard] Undoing autocorrect removes last character

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:leo+, b2g18 verified, b2g-v1.1hd fixed)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- verified
b2g-v1.1hd --- fixed

People

(Reporter: isabelrios, Assigned: djf)

Details

(Whiteboard: MMS_TEF)

Attachments

(1 file)

Bug seen on Unagi with today's build (06/10)
Gecko-b518de0
Gaia-aa166a4

PROCEDURE
1. Create a new message, SMS or MMS.
2. Tap on the text field and unselect upper cases
3. Start typing: 'http', then ':'
4. Start typing any word, then ':'

EXPECTED
It is possible to write 'http://...' without problems.
When typing ':', ';' the keyboard should react properly

ACTUAL
Afert typing ':', 'http' is change to 'HTTP:'
It also happens when typing ';' after 'http'.
Also, when typing ':' after a word, latest char is removed and changed for another one and ':', then if you remove ':', the character appears.
blocking-b2g: --- → leo?
Whiteboard: MMS_TEF
Based on the description it sounds like a blocker and may be a recent regression ?
blocking-b2g: leo? → leo+
Assignee: nobody → mike
The reported behavior is consistent across all applications (reproducible with the same steps in the Calendar application, for example), so I'm moving this to Keyboard.

Isabel: the behavior you were experiencing was the keyboard's autocorrection functionality. "http" was being recognized as a misspelling of the acronym "HTTP", and when you entered the colon character, the autocorrection agent stepped in and replaced your lower-case version with the upper-case version.

(In reply to Isabel Rios [:isabel_rios] from comment #0)
> Also, when typing ':' after a word, latest char is removed and changed for
> another one and ':', then if you remove ':', the character appears.

I believe that this behavior would feel much more intentional (and less like a bug) if pressing backspace after an autocorrection operation *only* reverted the autocorrection (and did not also delete the character that triggered it).

This is very subjective, so I'm requesting info from :djf. David: I'd be happy to work on the patch if my proposal seems valid.
Assignee: mike → nobody
Component: Gaia::SMS → Gaia::Keyboard
Flags: needinfo?(dflanagan)
Summary: [SMS/MMS] Keyboard is doing strange things when typing some symbols (':', ';') → [Keyboard] Undoing autocorrect removes last character
Thanks for diagnosing this, Mike.

My intent is to follow Android's lead on this. I never noticed that it kept the punctuation character (or space) when reverting an autocorrection.  I've got other autocorrect bugs to fix, so I'll take this one along with those.

When I try typing 'http' into Android, it does not force it to uppercase. That seems to me to be a flaw in our dictionary (which is based on an out-of-date Android wordlist), and I think we might want to address that, as well.
Assignee: nobody → dflanagan
Flags: needinfo?(dflanagan)
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Rudy,

This is another very simple patch. Currently, if I backspace after an autocorrection, it reverts the autocorrection and also erases the space or punctuation character that triggered the auto-correction.  The patch makes us behave like Android (which is what I wanted in the first place) by reverting the correction but leaving the space or punctuation.
Attachment #764017 - Flags: review?(rlu)
The original reporter also complained about the difficulty of typing http:// because http autocorrects to HTTP when she typed :.

I'll add a note about this to bug 860550. I think we ought to add lowercase http to our dictionaries to handle this case. Bug 880117 may also need a custom word added to the English dictionary, so I'll mention it there, too.
Attachment #764017 - Flags: review?(rlu) → review?(mike)
Comment on attachment 764017 [details]
link to patch on github

Hi all,

Steal the review from Mike after talking to David. :)
r=me.

Mike and I have a comment about the variable naming, but won't block this issue.
Thanks.
Attachment #764017 - Flags: review?(mike) → review+
I didn't see that Mike had left a comment on github... Both of your variable name suggestions are better than mine.  I'll fix that and land.  Thanks.
Landed to master: https://github.com/mozilla-b2g/gaia/commit/f9372072b94a2579575ec45bfa29d97b9fff4b9a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted f9372072b94a2579575ec45bfa29d97b9fff4b9a to:
v1-train: 83bd1681991494808b34b53cf4c538e1bc3c6d18
1.1hd: 83bd1681991494808b34b53cf4c538e1bc3c6d18
 Issue no longer reproduces in the Leo 

Build ID: 20130716070204
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/629020cf576b
Gaia: fb9362d34260771d4a00b9a0e10a6bbad397bd3b
Platform Version: 18.1

Keyboard, Undoing autocorrect does notremoves last character
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: