Closed
Bug 1092549
Opened 10 years ago
Closed 10 years ago
Sometimes, the new inputcontext is broken if input focus moved from chrome back to app process
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: alive, Assigned: timdream)
References
(Depends on 1 open bug)
Details
(Whiteboard: [FT:System-Platform])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
timdream
:
review+
|
Details | Diff | Splinter Review |
STR
0. Apply patch of bug 1079748
1. Open message app and write a new message, focus the contact input. Keyboard will show up.
2. Open rocketbar from the left side of title area.
3. Type something.
4. Click close button of rocketbar.
Actual
The keyboard will stay when rocketbar is closed,
but when you click keyboard nothing is shown in the input.
Flags: needinfo?(timdream)
Assignee | ||
Comment 1•10 years ago
|
||
Let me take a look on Monday then.
Blocks: keyboard-api
blocking-b2g: --- → backlog
Component: Gaia::System::Input Mgmt → DOM: Device Interfaces
Flags: needinfo?(timdream)
Product: Firefox OS → Core
Whiteboard: [FT:System-Platform]
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → timdream
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
I can verify this is an API issue; the keyboard was given an inputcontext pointing to the right textarea but all methods (sendKey() etc) rejects with "InputContext has expired" error.
Assignee | ||
Comment 3•10 years ago
|
||
Here is the log I collected. The root cause of this bug is because formMM was being reset to the previous focused element when focus changed. The fix required will be very similar to bug 1083617.
I/Gecko ( 6713): XXXXX MozKeyboard.js inputcontext {"contextId":15,"type":"search","choices":null,"value":"","inputmode":"verbatim","selectionStart":0,"selectionEnd":0,"max":"","min":"","lang":"","textBeforeCursor":"","textAfterCursor":""}
I/Gecko ( 6375): XXXXX 703 fa_unhandleFocusSync
I/Gecko ( 6375): XXXXX 710 blur
I/Gecko ( 6713): XXXXX MozKeyboard.js inputcontext null
I/Gecko ( 6828): XXXXX 685 fa_handleFocusSync
I/Gecko ( 6828): XXXXX 690 focus true
I/Gecko ( 6375): XXXXX 476 SequenceError
I/Gecko ( 6375): XXXXX forwardEvent w/ new MM: Keyboard:FocusChange{"target":{},"name":"Forms:Input","sync":false,"json":{"contextId":25,"type":"textarea","choices":null,"value":"cfnn","inputmode":"verbatim","selectionStart":4,"selectionEnd":4,"max":"","min":"","lang":"","textBeforeCursor":"cfnn","textAfterCursor":""},"data":{"contextId":25,"type":"textarea","choices":null,"value":"cfnn","inputmode":"verbatim","selectionStart":4,"selectionEnd":4,"max":"","min":"","lang":"","textBeforeCursor":"cfnn","textAfterCursor":""},"objects":{}}
I/Gecko ( 6713): XXXXX MozKeyboard.js inputcontext {"contextId":25,"type":"textarea","choices":null,"value":"cfnn","inputmode":"verbatim","selectionStart":4,"selectionEnd":4,"max":"","min":"","lang":"","textBeforeCursor":"cfnn","textAfterCursor":""}
I/Gecko ( 6375): XXXXX forwardEvent w/ new MM: Keyboard:SequenceError{"target":{},"name":"Forms:SequenceError","sync":false,"json":{"requestId":"id{89258bd5-5411-4dff-ba22-ec5aa4a37642}","error":"Expected contextId 16 but was 15"},"data":{"requestId":"id{89258bd5-5411-4dff-ba22-ec5aa4a37642}","error":"Expected contextId 16 but was 15"},"objects":{}}
I/Gecko ( 6375): XXXXX 476 SequenceError
I/Gecko ( 6713): XXXXX SequenceError: Expected contextId 16 but was 25
I/Gecko ( 6375): XXXXX 476 SequenceError
I/Gecko ( 6713): XXXXX SequenceError: Expected contextId 16 but was 25
I/Gecko ( 6375): XXXXX 476 SequenceError
I/Gecko ( 6713): XXXXX SequenceError: Expected contextId 16 but was 25
Assignee | ||
Comment 4•10 years ago
|
||
This patch further limit the message capable of changing the formMM to the real focus message only. Again because of bug 1090032 I can't write any test for this.
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=415c534deb57
Attachment #8515802 -
Flags: review?(xyuan)
Assignee | ||
Updated•10 years ago
|
Summary: After applying bug 1079748, when switching focus, the input failed to get keys → Sometimes, the new inputcontext is broken if input focus moved from chrome back to app process
Updated•10 years ago
|
Attachment #8515802 -
Flags: review?(xyuan) → review+
Comment 5•10 years ago
|
||
Comment on attachment 8515802 [details] [diff] [review]
Patch v1.0
Review of attachment 8515802 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/inputmethod/Keyboard.jsm
@@ +257,5 @@
> + // message gets to the right form now on.
> + this.formMM = mm;
> + } else { // input is blurred
> + // A blur message can't be sent to the keyboard if the focus has
> + // already taken away at first place.
nit: been taken away
Assignee | ||
Comment 6•10 years ago
|
||
Let's wait for try to finish before checkin-needed.
Attachment #8515802 -
Attachment is obsolete: true
Attachment #8515838 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 7•10 years ago
|
||
Updated•10 years ago
|
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•10 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
You need to log in
before you can comment on or make changes to this bug.
Description
•