Closed
Bug 741208
Opened 14 years ago
Closed 14 years ago
NotifyComposeBodyReady not called when Forwarding or Edit as New
Categories
(Thunderbird :: Message Compose Window, defect)
Tracking
(thunderbird13-, thunderbird14-)
RESOLVED
INVALID
People
(Reporter: patrick, Assigned: Bienvenu)
References
Details
When using "Edit as new" or Forward message(at least inline forwarding), and the compose window is recycled then stateListeners registered with RegisterStateListener do not receive a NotifyComposeBodyReady event. When doing the same with new window, and when using "reply" the event is fired as expected.
Steps to reproduce:
1. Use Edit as new (and close window again)
2. Use Edit as new again
Enigmail needs this event in order to trigger decryption.
Comment 2•14 years ago
|
||
Looks like it is fixed in 13 alpha, right?
| Reporter | ||
Comment 3•14 years ago
|
||
Using 13.0a2, 2012-04-02 the problem is not fixed.
Comment 4•14 years ago
|
||
You are right. I don't know why I didn't see the bug.
Comment 5•14 years ago
|
||
Setting the flag as enigmail is a big use case for Thunderbird.
tracking-thunderbird13:
--- → ?
Comment 6•14 years ago
|
||
So what's an approximate regression range? The version field says 11, was it seen in that and 12, or has this only come up in 13?
Updated•14 years ago
|
Keywords: regressionwindow-wanted
| Reporter | ||
Comment 7•14 years ago
|
||
According to bug 729034 this is visible since TB 10. It's certainly visible in 11-13
Updated•14 years ago
|
Comment 8•14 years ago
|
||
I'm going to see if David can take a look at this in the next cycle. Getting a regression window/bug would probably be a great help.
| Assignee | ||
Comment 9•14 years ago
|
||
This is working for me - we send the event every time, whether or not the compose window is recycled, and for all composition types (reply, forward inline, edit message as new). By WFM, I mean we hit the ComposeBodyReady case in nsMsgCompose::NotifyStateListeners every time.
Is it possible that you're not registering your listener in the reusing a recycled compose window case?
| Assignee | ||
Comment 10•14 years ago
|
||
Patrick, can you tell me what causes you to register your listener? We don't unregister listeners when we cache compose windows, from what I can tell.
| Reporter | ||
Comment 11•14 years ago
|
||
Here is the stripped down code related to (un)registering:
window.addEventListener("load",
function _enigmail_composeStartup (event)
{
// ...
gMsgCompose.RegisterStateListener(Enigmail.composeStateListener);
// ...
},
false);
window.addEventListener("unload",
function _enigmail_composeUnload (event)
{
// ...
if (gMsgCompose)
gMsgCompose.UnregisterStateListener(Enigmail.composeStateListener);
// ...
},
false);
Enigmail.composeStateListener = {
NotifyComposeFieldsReady: ...
ComposeProcessDone: ...
NotifyComposeBodyReady: ...
SaveInFolderDone: ...
};
| Reporter | ||
Comment 12•14 years ago
|
||
Forgot this one:
window.addEventListener('compose-window-reopen',
function _enigmail_msgComposeReopen (event)
{
gMsgCompose.RegisterStateListener(Enigmail.composeStateListener);
},
true);
| Assignee | ||
Comment 13•14 years ago
|
||
Patrick, have you verified that this doesn't work for you on trunk builds? The report only mentions tb 13 alpha.
| Assignee | ||
Comment 14•14 years ago
|
||
Patrick, could you put some dumps in your code to see when you're registering and unregistering when reproducing this bug?
| Reporter | ||
Comment 15•14 years ago
|
||
Still the same on 15.0a1 (2012-06-01).
This is the log extract from Enigmail:
2012-06-01 17:25:51.373 [DEBUG] enigmailMsgComposeOverlay.js: Enigmail.msg.composeOpen (got event load)
2012-06-01 17:25:51.374 [DEBUG] enigmailMsgComposeOverlay.js: Enigmail.msg.composeOpen: done RegisterStateListener
2012-06-01 17:25:51.585 [DEBUG] enigmailMsgComposeOverlay.js: ECSL.NotifyComposeFieldsReady
2012-06-01 17:25:51.595 [DEBUG] enigmailMsgComposeOverlay.js: ECSL.ComposeBodyReady
2012-06-01 17:25:55.833 [DEBUG] enigmailMsgComposeOverlay.js: Enigmail.msg.msgComposeClose (got event compose-window-close)
2012-06-01 17:26:00.163 [DEBUG] enigmailMsgComposeOverlay.js: Enigmail.msg.msgComposeReopen (got event compose-window-reopen)
2012-06-01 17:26:00.166 [DEBUG] enigmailMsgComposeOverlay.js: Enigmail.msg.composeReopen: done RegisterStateListener
2012-06-01 17:26:04.905 [DEBUG] enigmailMsgComposeOverlay.js: Enigmail.msg.msgComposeClose (got event compose-window-close)
ECSL is the ComposeStateListener
| Assignee | ||
Comment 16•14 years ago
|
||
I installed enigmail and debugged this a bit. In the problem case, the issue is that you're registering your listener after we send the body ready notification, so you're not going to get a notification.
| Assignee | ||
Comment 17•14 years ago
|
||
oh, and in this case, it seems that we have the body all ready to go on load, unlike reply, which quotes asynchronously.
| Reporter | ||
Comment 18•14 years ago
|
||
(In reply to David :Bienvenu from comment #16)
> I installed enigmail and debugged this a bit. In the problem case, the issue
> is that you're registering your listener after we send the body ready
> notification, so you're not going to get a notification.
Are you telling me that I should listen to an earlier event (if there is any), or is it something for you to fix in Thunderbird?
| Assignee | ||
Comment 19•14 years ago
|
||
(In reply to Patrick Brunschwig from comment #18)
> Are you telling me that I should listen to an earlier event (if there is
> any), or is it something for you to fix in Thunderbird?
listen for an earlier event, if there is one; if not, we need to figure out a way for there to be one, or a way to make what you want to do possible in the case of recycled compose windows.
| Reporter | ||
Comment 20•14 years ago
|
||
Thanks a lot for your help :-)
I found that the "compose-window-init" event is fired earlier than "compose-window-reopen", so I'll use that.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Updated•14 years ago
|
Updated•11 years ago
|
Keywords: regressionwindow-wanted
You need to log in
before you can comment on or make changes to this bug.
Description
•