Closed Bug 1128905 Opened 9 years ago Closed 6 years ago

Combining diacritic causes incorrect autocorrect

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: friedel, Unassigned)

References

Details

Attachments

(4 files)

When a textarea already contains a combining diacritic, autocorrection after that point does not work correctly.

To reproduce:
 - Enter a letter with combining diacritic, for example "ɛ̂" (two Unicode code points)
 - type in a new word that will require autocorrect, for example "tect" (instead of "text")
 - Press the space bar to do the autocorrect

Expected:
 - "tect" should be replaced with "text"

Instead we see:
 - "tect" still in the text area, and the last three letters are highlighted.

If we started with two combining diacritics in the initial text (for example "ɛ̂ɛ̂" then the same will happen, but only the last two characters will be selected. If we start with four of them, no selection will be shown. This proves to me that the problem is with the combining diacritics, since the number of combining diacritics determines the length of the selection after pressing space (up to the length of the word).
Attached video Video
Hi, I was investigating this, but doesn't happen for me (see video).

I use `el.value += '\u025B\u0302'` from JavaScript to append the char to the textbox.
Flags: needinfo?(friedel)
Attached file UI Test for reference
FYI, this is the test
Thanks for looking into this Jan. I'm not familiar with the testing infrastructure. I can only think of one reason for this difference. Please say if this makes sense:

Since you directly edit el.value, instead of "typing" it through the keyboard app, could it be that the bug is in the entering of combining diacritics through the interface, rather than the autocorrect as I initially suggested? The keyboard app keeps book of the cursor position (variable `cursor` in latin.js). I'm wondering if that is where something is going wrong. Sorry that I can't put more time into this now.
Flags: needinfo?(friedel)
Do you have a branch somewhere? Or which keyboard contains these characters?
Flags: needinfo?(friedel)
If I have reproduction path it'd be more easy to say something about this :-)
I used the layout "en-Africa" with the patch in bug 1125078 (blocked by this bug). I felt that this needs fixing before I send a pull request. Thanks for looking into it.
Flags: needinfo?(friedel)
Attached image weird-diacritics.png
More issues (on flame master). In the alt menu it's shown wrong.
Hi, the alt menu shows it wrong, and also inserts the char wrong, but autocorrect is not affected.

Can you put your current working branch on github so I can clone it in exactly the same state, and send me a video of the autocorrect issue?
Flags: needinfo?(friedel)
Hmm, the issue with the display is a font problem in Open Sans. In Arial it renders fine...
Sorry Jan, I realise things might have gotten lost between the bugs, but that patch is for Gaia 2.0, and that is all I'm testing now since I was told this is very urgent. Can you point so some documentation on doing a video? I'm not sure I'll be able to get to that before I'm away for a few days.
Flags: needinfo?(friedel)
Attached video New Project.webm
This is a quick attempt at a video of what I see. To reiterate:
 - Gaia 2.0 (736933b25)
 - en-Africa layout with the extra patch in the blocked bug
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: