bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Autocorrect suggestions disappear when switching between normal mode & ?123 mode



Firefox OS
5 years ago
5 years ago


(Reporter: janjongboom, Assigned: janjongboom)


Gonk (Firefox OS)
Bug Flags:
in-moztrap +

Firefox Tracking Flags

(b2g18 fixed)



(1 attachment, 1 obsolete attachment)

Type something, suggestions appear, now go into ?123 mode. Now the suggestions disappear. Type '?', autocorrect will be applied.


5 years ago
Assignee: nobody → janjongboom
Created attachment 757870 [details] [diff] [review]

At the moment the suggestion list disappears because the complete keyboard layout gets re-rendered. This patch instructs the worker to re-render the list of suggestions after keyboard has been switched.
Attachment #757870 - Flags: review?(dflanagan)
Comment on attachment 757870 [details] [diff] [review]

Thanks for filing this bug. 

r- on the patch because it does not just re-display the existing set of suggestions, but actually recomputes the suggestions. They should be cached, but this still requires a round-trip to the worker thread and back. I think you'd avoid the flicker if you just cached the current suggestions in glue.sendCandidates() and then called IMERender.showCandidates() again from drawKeyboard().

Think also about what the right thing to do is when we switch keyboards with the globe icon button. There is a patch pending to have that switch auto-correct languages.  Is the right thing to do there to display the current suggestions or to recompute them in the new language?  Probably the latter.  But I hope we can do that without introducing a new method into the input method API.  Probably the inputMethod.activate() call should be made to recompute suggestions if appropriate.  This may need to wait for bug 867175, however.
Attachment #757870 - Flags: review?(dflanagan) → review-
It might also be possible to remember the suggestions in render.js and fix this bug there.


5 years ago
Blocks: 797170
Yeah, that's why I wrote it this way, because it'll work in any scenario where a keyboard change occurs. Not emptying the elements (via the innerHTML = '') would be better and just re-rendering the keys as long as the locale stays the same.

Comment 5

5 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 6

5 years ago
Created attachment 758880 [details]
link to github pull request
Attachment #757870 - Attachment is obsolete: true
Attachment #758880 - Flags: review?(dflanagan)
Comment on attachment 758880 [details]
link to github pull request

Thanks Evan!

Jan: this patch will do or now. We'll handle recomputing suggestions when switching keyboard layouts in the bug that makes them switch languages.
Attachment #758880 - Flags: review?(dflanagan) → review+
Landed on master: https://github.com/mozilla-b2g/gaia/commit/159b0dd42bbc4c2ddfa6aee6b9a0bea11bbd3072
Last Resolved: 5 years ago
Resolution: --- → FIXED
Uplifted to v1-train in bug 873934
status-b2g18: --- → fixed

Comment 10

5 years ago
Added Keyboard Suite Test Case #8484 - [Keyboard] Switching keyboard text entry modes does not break Auto Correct word suggestions
Flags: in-moztrap?(cschmoeckel) → in-moztrap+
You need to log in before you can comment on or make changes to this bug.