Closed
Bug 867567
Opened 12 years ago
Closed 12 years ago
JavaScript Error: "TypeError: focused is null" {file: "chrome://browser/content/browser.js" line: 1205}
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: kats, Assigned: marcosadp)
References
Details
(Whiteboard: [lang=js][mentor=kats])
Attachments
(1 file)
1.13 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
This line of code in browser.js:
if (focused instanceof HTMLTextAreaElement || focused.isContentEditable) {
causes the script error noted in the summary when focused is null. Should be an easy fix for somebody looking for a good first bug.
Comment 1•12 years ago
|
||
This was reported in bug 864926, although the description in that bug points to the wrong line of code. Setting this bug to block that one, since there was another error reported in there as well.
Blocks: 864926
Comment 2•12 years ago
|
||
Hi there,
I've been speaking to people on the IRC channel and this bug was suggested as a good first bug to tackle. I've had a look into it but am unable to reproduce the error. It's clear to me what is going wrong here, just I don't see it going wrong on my device. I do get the "Only internal code is allowed..." error described in bug 864926 when I open a new private tab, though. How do I go about reproducing this script error?
Is the intention here to work out why focused is null or simply do a
if (!focused) return null
catch either before or after the HTMLFrameElement search/traveral?
Thanks...
Comment 3•12 years ago
|
||
Hi Jamie, thanks for showing interest in this bug.
It sounds to me like we just need a null check. kats is on vacation right now, but maybe wesj can help you out with this bug, since he has also worked on this code.
Flags: needinfo?(wjohnston)
Comment 4•12 years ago
|
||
Yeah. Glancing at the code, it looks like we DO expect getFocusedInput to return null sometimes. I'm also having trouble reproducing it, but the null check seems like a good idea.
Flags: needinfo?(wjohnston)
Reporter | ||
Comment 5•12 years ago
|
||
Hi Jamie, sorry for the delayed response; I was on vacation. But yeah as wesj said getFocusedInput can return null, and so we just need to modify the if condition I posted above to include a null check.
Assignee | ||
Comment 6•12 years ago
|
||
Kartikaya, I would like to work on this. Could you please assign me the bug?
Updated•12 years ago
|
Assignee: nobody → marcosadp
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #759778 -
Flags: review?(bugmail.mozilla)
Reporter | ||
Comment 8•12 years ago
|
||
Comment on attachment 759778 [details] [diff] [review]
Patch v1
Review of attachment 759778 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thanks!
Attachment #759778 -
Flags: review?(bugmail.mozilla) → review+
Reporter | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 9•12 years ago
|
||
Keywords: checkin-needed
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•