improperly parented modal dialog in nsMsgPrompts.cpp

VERIFIED FIXED in M18

Status

MailNews Core
Composition
P3
normal
VERIFIED FIXED
18 years ago
10 years ago

People

(Reporter: Dan M, Assigned: Scott MacGregor)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+][nsbeta2-] fix in hand)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
nsNetSupportDialog should only be used as a backup plan if no other nsIPrompt 
interface is available. It has been used in dozens of places because of its 
seductive convenience. But it's flawed, creating modal windows that don't behave 
correctly; the cause of various blanket bugs like 25684 and 39439 (both currently 
considered nsbeta2+).
  This problem can only be fixed by trying much harder to find a proper window to 
be the modal dialog's parent. nsNetSupportDialog should be relegated to providing 
backup when herculean efforts to locate the actual parent window fail for some 
reason.
  As an example, the cookie service has been taught to use a proper parent window 
for its dialog by laboriously storing a reference to that window's nsIPrompt in 
nsHTTPChannel, from which it can be extracted and passed around while processing 
notification events, punting to nsNetSupportDialog only when no other choice is 
available. That same sort of thing needs to be done in many more places.
  There are two such places in nsMsgPrompts.cpp: nsMsgDisplayMessageByString() 
and nsMsgAskBooleanQuestionByString().
  Happy recipients of this bug would spread the happiness most widely if they 
would start using a good nsIPrompt window. The "modal windows don't behave 
nicely" bugs are being made dependent on this bug and its siblings, and will 
eventually be closed as "as fixed as they're going to get" once these have all 
been considered.
(Reporter)

Updated

18 years ago
Blocks: 25684

Comment 1

18 years ago
reassigning to mscott
Assignee: ducarroz → mscott
(Assignee)

Comment 2

18 years ago
I believe these bugs are supposed to be nsbeta2. See 44164 for an example.
Keywords: nsbeta2

Comment 3

18 years ago
Putting on [nsbeta2+] radar for beta2 fix. 
Whiteboard: [nsbeta2+]
(Assignee)

Comment 4

18 years ago
I won't get to this one for a while. 
Whiteboard: [nsbeta2+] → [nsbeta2+] est. 7/21

Updated

18 years ago
Target Milestone: --- → M17
(Assignee)

Comment 5

18 years ago
I would not hold nsbeta2 for this. Per the leads meeting today that's the new
litmus test. Adding the nsbeta2-. 
Keywords: nsbeta3
Whiteboard: [nsbeta2+] est. 7/21 → [nsbeta2-]
Target Milestone: M17 → M18

Updated

18 years ago
Keywords: mail4

Comment 6

18 years ago
+ per mail triage
Whiteboard: [nsbeta2-] → [nsbeta3+][nsbeta2-]
(Assignee)

Comment 7

18 years ago
Created attachment 12648 [details] [diff] [review]
fix for this bug and for 44161
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Whiteboard: [nsbeta3+][nsbeta2-] → [nsbeta3+][nsbeta2-] fix in hand
(Assignee)

Comment 8

18 years ago
Fix checked in. And boy does it make things look so much more polished. alert
and status dialogs that come up while the compose window is still up are now
centered and parented off of the compose window. After you hit send and the
compose window is gone, the alerts are parented off of the top most mail window.
Makes it a lot harder to miss the dialogs which used to be behind open windows.....
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 9

18 years ago
Suresh - pls verify.
QA Contact: lchiang → suresh

Comment 10

18 years ago
Marking verified. nsMsgPrompts.cpp now uses nsIPrompt.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.