Closed Bug 879187 Opened 11 years ago Closed 11 years ago

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

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g18 fixed)

RESOLVED FIXED
Tracking Status
b2g18 --- fixed

People

(Reporter: janjongboom, Assigned: janjongboom)

References

Details

Attachments

(1 file, 1 obsolete file)

Type something, suggestions appear, now go into ?123 mode. Now the suggestions disappear. Type '?', autocorrect will be applied.
Assignee: nobody → janjongboom
Attached patch Patch (obsolete) — Splinter 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]
Patch

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.
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.
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)
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
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted to v1-train in bug 873934
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.

Attachment

General

Created:
Updated:
Size: