Closed Bug 375381 Opened 17 years ago Closed 16 years ago

Edit Draft does not function in standalone msg window (MsgComposeDraftMessage is not defined)

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 3.0b2

People

(Reporter: Aureliano, Assigned: rain1)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.3pre) Gecko/20070321 Thunderbird/2.0pre ID:2007032103

Create a new message and save it.
Open the draft with "Open message in a new windows": the button "Edit Draft" not function. The mail it stay not editable.

Reproducible: Always

Steps to Reproduce:
1.Create a new message and save it.
2.Open the draft with "Open message in a new windows"
3.the button "Edit Draft" not function
Actual Results:  
The mail it stay not editable.

Expected Results:  
The mail it become editable.

Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.3pre) Gecko/20070321 Thunderbird/2.0pre ID:2007032103
Version: unspecified → 2.0
From the Error console : Error: MsgComposeDraftMessage is not defined
Source File: chrome://messenger/content/messageWindow.xul
Line: 1

I will try to find a regression window
Status: UNCONFIRMED → NEW
Ever confirmed: true
Seems WFM on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4pre) Gecko/20070325 Thunderbird/2.0pre ID:2007032503
wfm on mac using version 2.0pre (20070327). I tested using both "open message in a new window and open message in an existing window" and had no issues, at least with the en-US build.
This cannot work for any of the operating systems. The first time I also miss-read the steps. Take care to open the draft in a new window before hitting the "Edit draft" button.

MsgComposeDraftMessage is called from:
http://lxr.mozilla.org/mozilla1.8/source/mail/base/content/msgHdrViewOverlay.xul#158

but these function exists in:
http://lxr.mozilla.org/mozilla1.8/source/mailnews/base/resources/content/threadPane.js#170

which is not included when we have a separat window due to no threadpane exists.

So the question is, do we need the "Edit draft" button at this location?
Marcia, Magnus: you need to explicitly open the draft as a normal message via the context menu. 
Actually, I think that when you that, the standalone message window shouldn't show the Edit button at all, since you explicitly worked around the Draft state of the message.
(And in fact, SeaMonkey does not show the Edit button in this case.)
Not only 2.0 branch. Also existent on Trunk.
OS: Windows XP → All
Hardware: PC → All
Version: 2.0 → Trunk
Summary: Edit Draft not function → Edit Draft does not function in standalone msg window (MsgComposeDraftMessage is not defined)
You don't see it in SeaMonkey because SM didn't get bug 291341's switch from a global that's only set to true in msgMail3PaneWindow.js to looking at the draftiness of the msg's folder, whether or not it's currently being displayed in that or any folder.
Blocks: 291341
No longer blocks: 303545
Assignee: mscott → nobody
still here on 3.0a2 , but funny enough, open msg in new tab, edit works ok. 

For tb3 tab and win should behave the same, whether is edit works or edit is not shown. (IMHO edit should work, as I see msg pane similar with msg in another win/tab.)
Attached patch fix (obsolete) — Splinter Review
This'll fix it, but I'm not sure if we should remove the edit button altogether. Opinions?
Attachment #352570 - Flags: ui-review?(clarkbw)
Attachment #352570 - Flags: review?(bienvenu)
Comment on attachment 352570 [details] [diff] [review]
fix

awesome, thanks for the patch!  As discussed in IRC, the edit button should be fixed
Attachment #352570 - Flags: ui-review?(clarkbw) → ui-review+
Attachment #352570 - Flags: review?(bienvenu)
Comment on attachment 352570 [details] [diff] [review]
fix

cancelling review, as this results in a JS error on the dump console.
This should be better.

gThreadTree was defined in msgMail3PaneWindow.js even though its only use was in threadPane.js <http://mxr.mozilla.org/comm-central/search?find=%2F&string=gThreadTree>. Since we're in a message window, we didn't include msgMail3PaneWindow. Hence the console output.
Assignee: nobody → sid1337
Attachment #352570 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #352601 - Flags: ui-review+
Attachment #352601 - Flags: superreview?(bienvenu)
Attachment #352601 - Flags: review?(bienvenu)
Attachment #352601 - Flags: superreview?(bienvenu)
Attachment #352601 - Flags: superreview+
Attachment #352601 - Flags: review?(bienvenu)
Attachment #352601 - Flags: review+
Comment on attachment 352601 [details] [diff] [review]
A better fix
[Checkin: Comment 15]

thx, seems to work fine.
Keywords: checkin-needed
Comment on attachment 352601 [details] [diff] [review]
A better fix
[Checkin: Comment 15]

http://hg.mozilla.org/comm-central/rev/6d6d306000ee
Attachment #352601 - Attachment description: A better fix → A better fix [Checkin: Comment 15]
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b2
Depends on: 470592
Works fine now. Thanks for the fix! Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081224 Shredder/3.0b2pre ID:20081224025847
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.