[Keyboard] Keyboard app loses "inputContext" object when switching layouts

RESOLVED FIXED in Firefox OS v1.2

Status

Firefox OS
Gaia::Keyboard
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: lchang, Assigned: bmac)

Tracking

unspecified
1.2 C4(Nov8)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:koi+, b2g-v1.2 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
STR:

1. enable multiple keyboard layouts from settings
2. click in any text field
3. click the "global" button to switch layouts and will see the logs as follows:

------------------------------------------------------
E/GeckoConsole(  773): [JavaScript Error: "TypeError: inputContext is null" {file: "app://keyboard.gaiamobile.org/js/keyboard.js" line: 1736}]
E/GeckoConsole(  773): Content JS ERROR at app://keyboard.gaiamobile.org/js/keyboard.js:1718 in showKeyboard: Cannot get inputContext
E/GeckoConsole(  773): [JavaScript Error: "TypeError: inputContext is null" {file: "app://keyboard.gaiamobile.org/js/keyboard.js" line: 1736}]
E/GeckoConsole(  773): Content JS ERROR at app://keyboard.gaiamobile.org/js/keyboard.js:1718 in showKeyboard: Cannot get inputContext
E/GeckoConsole(  773): [JavaScript Error: "TypeError: inputContext is null" {file: "app://keyboard.gaiamobile.org/js/keyboard.js" line: 1736}]
E/GeckoConsole(  773): Content JS ERROR at app://keyboard.gaiamobile.org/js/keyboard.js:1718 in showKeyboard: Cannot get inputContext
E/GeckoConsole(  773): [JavaScript Error: "TypeError: inputContext is null" {file: "app://keyboard.gaiamobile.org/js/keyboard.js" line: 1736}]
E/GeckoConsole(  773): Content JS ERROR at app://keyboard.gaiamobile.org/js/keyboard.js:1718 in showKeyboard: Cannot get inputContext
------------------------------------------------------

It happens on both devices and firefox nightly:
gaia: efa7b94e29a8e9612e6ef94d80d52b8051a2aeb1
gecko: f25b780813123fbdaae0abb2873c50f79b60b509
firefox nightly: 27.0a1 (2013-10-16)

This error has not cause any effect yet but it may break certain actions, which  needs "inputContext", on "deactivate" event in layout engines.

Actually, this issue will block Bug 906617 that we try to call "inputContext.endComposition" to clear composition string on "deactivate" event of pinyin engine.
Yuan, feel free to steal this. Just a reminder for me to take a look at it.
Assignee: nobody → janjongboom
(Assignee)

Comment 2

5 years ago
Jan, Is it ok for me to take this bug? I'm looking to pick up some keyboard work.
Flags: needinfo?(janjongboom)
Yeah, sure, you're aware that this is a Gecko bug?
Flags: needinfo?(janjongboom) → needinfo?(brendan)
On second thought, Maybe it isn't. :-)
(Assignee)

Comment 5

5 years ago
Thanks Jan, I think there may be a gaia solution to this issue. I will attach a pr with my notes and changes.
Flags: needinfo?(brendan)
(Assignee)

Comment 6

5 years ago
Created attachment 819198 [details] [review]
Github pull request
Attachment #819198 - Flags: review?(dflanagan)
Attachment #819198 - Flags: feedback?(janjongboom)
(Assignee)

Updated

5 years ago
Assignee: janjongboom → brendan
Comment on attachment 819198 [details] [review]
Github pull request

Stealing review as David is already loaded. Code looks good, some small nits in GitHub. If you have a smart idea about how to prevent calling |deactivate| a lot of times that'd be welcome.

The travis build fails over a marionette test that seems unrelated, can you rebase against master and see if the error disappears? If all good and nits addressed please ask for review again. Thanks!
Attachment #819198 - Flags: review?(dflanagan)
Attachment #819198 - Flags: review-
Attachment #819198 - Flags: feedback?(janjongboom)
(Assignee)

Updated

5 years ago
Attachment #819198 - Flags: review- → review?(janjongboom)

Comment 8

5 years ago
Plus it and assign milestone to 1.2 C4 (Nov. 8)
blocking-b2g: koi? → koi+
Target Milestone: --- → 1.2 C4(Nov8)
Comment on attachment 819198 [details] [review]
Github pull request

r=me. Do you have commit rights? If not, please set the checkin-needed flag.
Attachment #819198 - Flags: review?(janjongboom) → review+
And thanks for your work of course!
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Landed https://github.com/mozilla-b2g/gaia/commit/68705a8a59330f886bac8979d33477975b180bf4
Status: NEW → RESOLVED
Last Resolved: 5 years ago
status-b2g-v1.2: --- → affected
Keywords: checkin-needed
Resolution: --- → FIXED
Uplifted 68705a8a59330f886bac8979d33477975b180bf4 to:
v1.2: a299cac6a823c9d8bce00c0e1b88bd5ba46645f3
status-b2g-v1.2: affected → fixed
You need to log in before you can comment on or make changes to this bug.