JS error when pressing space on a Chat or Gloda facet view tab

RESOLVED FIXED in Thunderbird 15.0

Status

Thunderbird
Mail Window Front End
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: florian, Assigned: florian)

Tracking

Trunk
Thunderbird 15.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Created attachment 622681 [details] [diff] [review]
Possible patch

JavaScript error: chrome://messenger/content/mailWindowOverlay.js, line 2368: contentWindow is null

This JS error happens at least:
- on the Chat tab (when no textbox has the focus)
- on the Gloda facet view tab
- on chromeTab (which is a bit surprising, given that the method works for contentTab).

The attached patch returns early if the currently selected tab is neither a mail tab nor a contentTab.
I'm not sure it's a good solution, but it does fix the noisy JS error.
Other possible approaches:
- just add a null check on the contentWindow variable
- attempt to rewrite the whole function in a way that would make more sense; maybe using the getBrowser method of tabs (I haven't tried this because I'm not sure I fully understand the current code; it took me a while to understand what the _mailrssiframe stuff was, it seemed like dead code at first).
Attachment #622681 - Flags: review?(bwinton)
Comment on attachment 622681 [details] [diff] [review]
Possible patch

I think I would prefer a contentWindow null check, so that we can add other different tab types in future (one of which mconley might be adding right now)…

So, r-, but given the simplicity, you can get an automatic r=me if you implement that version.  ;)

Thanks,
Blake.
Attachment #622681 - Flags: review?(bwinton) → review-
Created attachment 623986 [details] [diff] [review]
Patch v2 (simple null check)

Carrying forward Blake's "automatic r=me if you implement that version".
Assignee: nobody → florian
Attachment #623986 - Flags: review+
http://hg.mozilla.org/comm-central/rev/ff9e90e9f0d0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
You need to log in before you can comment on or make changes to this bug.