Closed Bug 904224 Opened 12 years ago Closed 12 years ago

"System JS : ERROR chrome://browser/content/forms.js:827 TypeError: element is null" in green B2G mochitest-2,3 runs

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox24 unaffected, firefox25 unaffected, firefox26 fixed)

RESOLVED FIXED
Tracking Status
firefox24 --- unaffected
firefox25 --- unaffected
firefox26 --- fixed

People

(Reporter: RyanVM, Assigned: fabrice)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #902168 +++ Yuan, it appears that you are the primary maintainer of forms.js. Can you please investigate this? This and bug 902168 are VERY spammy (as you can see in the logs linked below). https://tbpl.mozilla.org/php/getParsedLog.php?id=26445003&tree=B2g-Inbound https://tbpl.mozilla.org/php/getParsedLog.php?id=26447273&tree=B2g-Inbound
Attached patch patchSplinter Review
Simple fix to bail out cleanly. We may need to fix the underlying issue but in any case getContentEditableText() needed to be a bit more robust.
Assignee: nobody → fabrice
Attachment #789303 - Flags: review?(xyuan)
Attachment #789303 - Flags: review?(xyuan) → review+
Hi Fabrice, the root cause is that we assume that key events of B2G are all generated by the virtual keyboard. As when virtual keyboard shows, the element is the current focus input element and won't be null, we don't check the element value. But in this case, we don't have a virtual keyboard and a focus input element. When 'keydown' events are generated, forms.js tries to update the selection info of the `focused element` and get `focused element is null` error.
Attachment #789351 - Flags: review?(fabrice) → review+
Fabrice, thanks. Mark as checkin-needed.
Keywords: checkin-needed
Blocks: 904628
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
No longer blocks: 892958
Blocks: log-SnR
Blocks: 920191
No longer blocks: log-SnR
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: