Multiple Tabs render last opened when no message pane

RESOLVED FIXED in Thunderbird 3.0b3

Status

Thunderbird
Toolbars and Tabs
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Justin, Assigned: Jeff Beckley)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 3.0b3
Bug Flags:
blocking-thunderbird3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.05 KB, patch
Jeff Beckley
: review+
Details | Diff | Splinter Review
(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090306 Lightning/1.0pre Shredder/3.0b3pre ID:20090306032239

For the last week or so, I've noticed if I get rid of the message pane and only open mail in tabs, that every tab is changed to render the last opened. So, for example, I open mail with subject fw:1, it renders fine until I open fw:2. At that point, the tab title shows correctly, but switching to fw:1 shows fw:2 content.

Reproducible: Always

Steps to Reproduce:
1.Use F8 or drag message pane out of view.
2.Middle click on a mail to open in tab.
3.Middle click on a mail to open in tab.
4.Check first opened tab. Rendering is of second opened tab.
Actual Results:  
First tab is a rendering of the second tab. This happens with all tabs opened. If you have opened 5 tabs, all of them will render the same content as the last opened tab.

Expected Results:  
Each tab should render it's own content without regard to last opened tab.
(Assignee)

Comment 1

9 years ago
I get it to repeat as well.  I'll take a look.
Assignee: nobody → beckley
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: blocking-thunderbird3?
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
(Assignee)

Comment 2

9 years ago
Created attachment 366064 [details] [diff] [review]
Easy fix

Here's a fix.  The problem was that the call to ChangeMessagePaneVisibility() was happening before the message was selected, which is when the tab state data save offs the message key in mailTabType.showTab().  So the fix was to delay the call to ChangeMessagePaneVisibility() to get it to happen afterward.
Attachment #366064 - Flags: review?(bugzilla)
Definitely a blocker; thanks for the patch!  I've started off by targetting this at 3.0b3, since there's already a patch.  Feel free to modify if something changes.
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b3
Attachment #366064 - Flags: review?(bugzilla) → review+
Comment on attachment 366064 [details] [diff] [review]
Easy fix

>-    ChangeMessagePaneVisibility(IsMessagePaneCollapsed());
>+    setTimeout(ChangeMessagePaneVisibility, 1, IsMessagePaneCollapsed());

Please make the timeout 0 if possible (that is kinda standard for this type of situation), and additionally add a comment explaining why we're not calling it straight away.

r=me with that fixed.
Whiteboard: [needs updated patch
(Assignee)

Comment 5

9 years ago
Created attachment 366769 [details] [diff] [review]
Final patch

Addresses Standard8's comments:
- Set timeout value to 0 instead of 1
- Added comment explaining why the delay to calling ChangeMessagePaneVisibility()

Continuing r=Standard8
Attachment #366064 - Attachment is obsolete: true
Attachment #366769 - Flags: review+
(Assignee)

Updated

9 years ago
Keywords: checkin-needed
Whiteboard: [needs updated patch
Checked in: http://hg.mozilla.org/comm-central/rev/94a9829006b8

Thanks Jeff.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED

Updated

9 years ago
Blocks: 392328

Comment 7

9 years ago
Bug 504552 related regression ?

Comment 8

9 years ago
I'm not sure this bug is fully fixed.

I can still quickly see the content of the last rendered tab when I switch to another tab (or when I open a new one).
You need to log in before you can comment on or make changes to this bug.