Closed Bug 742669 Opened 12 years ago Closed 12 years ago

JS error after closing a selected IM conversation, breaking some parts of the Chat UI

Categories

(Thunderbird :: Instant Messaging, defect)

defect
Not set
normal

Tracking

(thunderbird15 fixed)

RESOLVED FIXED
Thunderbird 16.0
Tracking Status
thunderbird15 --- fixed

People

(Reporter: aryx, Assigned: florian)

References

Details

Attachments

(1 file)

Thunderbird Daily 2012-04-04, Windows XP SP 3 32-bit

After opening a chat with an IRC member by double-clicking his name and then moving the mouse over his name in the left sidebar and closing this chat, the IRC channel again gets focus, but the right column still shows "previous conversations" and not the lists of members of the IRC channel.
In this case it seems only the top of the right pane (the conversation name and the channel topic) get updated. I'll need to investigate why this happens when closing a conversation (and the selection is moved automatically to the previous item in the list of conversations) and not when the user moves the selection.
Attached patch PatchSplinter Review
When this happens we have a JS strict warning:
components/imConversations.js, line 47: reference to undefined property this._purpleConv[this._currentTargetId]

This means that we are touching attributes of an imConversation that's already destroyed from the point of view of the imConversations service.

The attached patch contains a comment in the code explaining what was actually going wrong.
Assignee: nobody → florian
Status: NEW → ASSIGNED
Attachment #630585 - Flags: review?(mconley)
Summary: After closing direct chat with IRC member and IRC channel gets focus, participants list not shown, still previous conversation in use → JS error after closing a selected IM conversation, breaking some parts of the Chat UI
Comment on attachment 630585 [details] [diff] [review]
Patch

Review of attachment 630585 [details] [diff] [review]:
-----------------------------------------------------------------

Fixed the problem, and looks good.

::: mail/components/im/content/imconv.xml
@@ +169,5 @@
>            this.convView.destroy();
>            this.convView.parentNode.removeChild(this.convView);
>          }
> +
> +        // If the conversation we are destroying was selected, we should

Nice, clear documentation.
Attachment #630585 - Flags: review?(mconley) → review+
http://hg.mozilla.org/comm-central/rev/3a5b759c5a84
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
Comment on attachment 630585 [details] [diff] [review]
Patch

[Approval Request Comment]
We want this fix for Tb15, as the bug causes some user visible issues in the UI.
Attachment #630585 - Flags: approval-comm-aurora?
Attachment #630585 - Flags: approval-comm-aurora? → approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: