Closed
Bug 632390
Opened 13 years ago
Closed 13 years ago
Message reading and context menu can get broken when opening content tabs
Categories
(Thunderbird :: Message Reader UI, defect)
Thunderbird
Message Reader UI
Tracking
(blocking-thunderbird5.0 alpha3+, thunderbird3.1 wanted)
RESOLVED
FIXED
Thunderbird 3.3a3
People
(Reporter: standard8, Assigned: standard8)
References
Details
(Keywords: regression)
Attachments
(1 file)
4.16 KB,
patch
|
asuth
:
review+
|
Details | Diff | Splinter Review |
STR: 1) Restart Thunderbird 2) Select a message thread so that the multi message summary view is displayed 3) Open the add-ons manager or some other content tab 4) Switch back to the 3-pane mail tab At this point the context menu doesn't update correctly (and you get errors about content being null) and sometimes with the Conversations add-on, message reading can be broken as well. The issue appears to be that window.content is ending up as null. window.content normally tracks the content of the browser element with type "content-primary". I've checked that we set "content-targetable" on elements before "content-primary" and that seems fine, but still fails. It appears only to happen with the multi-message view selected (in step 2) - a chrome browser - not the single message view - the content browser. So I'm currently confused as to what is happening.
Assignee | ||
Updated•13 years ago
|
blocking-thunderbird5.0: --- → needed
Comment 1•13 years ago
|
||
Maybe nsContextMenu just shouldn't be accessing "content" and should instead either be explicitly contextualized through ownership and/or walking up the DOM tree (possibly through multiple iframes) until it hits the appropriate semantic content shell? I presume the current use of "content" is a cheat to avoid the cost of performing the walking? In general, constantly poking at DOM attributes to affect a de facto global seems more error prone than just poking at pure JS globals since we at least have a guarantee of the semantics of (pure) JS globals. Also, accessing globals set as we switch tabs is still not a great idea either...
Assignee | ||
Comment 2•13 years ago
|
||
I was going to complain about window.content being needed and things but then I realised it probably wouldn't make sense with chrome browsers and things anyway. In any case, I took a look at the browser/ version of nsContextMenu.js and a look at ours: - The HTTPIndex code could be removed as per bug 453793. - inFrame wasn't actually used anywhere, if it is needed later we can just copy from FF and get something which doesn't use content. - The openInBrowser doesn't have an equivalent, but I based it on some code that Firefox had elsewhere. This should mean it will work where required.
Assignee | ||
Updated•13 years ago
|
blocking-thunderbird5.0: needed → alpha3+
Comment 3•13 years ago
|
||
Comment on attachment 512598 [details] [diff] [review] The fix Thank you for your foray into this generally unpleasant area!
Attachment #512598 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Checked in: http://hg.mozilla.org/comm-central/rev/67e8ac2dfe85
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.3a3
Assignee | ||
Comment 6•13 years ago
|
||
We probably want to take this on 3.1 branch. Need to work out if its safe first though.
status-thunderbird3.1:
--- → wanted
You need to log in
before you can comment on or make changes to this bug.
Description
•