Closed Bug 44152 Opened 24 years ago Closed 24 years ago

Improperly parented modal dialog in nsAbsync

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: danm.moz, Assigned: rhp)

References

Details

(Whiteboard: [nsbeta3+])

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.
  One such place is nsAbsync::DisplayErrorMessage().
  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.
Blocks: 25684
Assignee: putterman → rhp
reassigning to rhp.
Keywords: nsbeta2
Target Milestone: --- → M17
nominating for nsbeta2. Same reason as all of the other similar bugs.
Status: NEW → ASSIGNED
Putting on [nsbeta2-] radar. Not critical to beta2. 
Whiteboard: [nsbeta2-]
Target Milestone: M17 → M18
Keywords: nsbeta2correctness, nsbeta3
Whiteboard: [nsbeta2-]
I now have this working for not only the error messages but the password dialog 
:-)

- rhp
Summary: improperly parented modal dialog in nsAbsync → [FIXED] improperly parented modal dialog in nsAbsync
Whiteboard: [FIXED]
per selmer and mail/news PDT
Whiteboard: [FIXED] → [FIXED] [nsbeta3+]
Fixed now....behaves much better :-)

- rhp
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Summary: [FIXED] improperly parented modal dialog in nsAbsync → Improperly parented modal dialog in nsAbsync
Whiteboard: [FIXED] [nsbeta3+] → [nsbeta3+]
Peter - can you verify?  When you get the password dlg or an error msg (which 
you can make happen, I hope :-), make sure the dialog is modal.

Thanks.
QA Contact: lchiang → pmock
Verified as fixed under win32, linux, and macos using the following builds:
 win32 commercial seamonkey build 2000-091108-m18 installed on P500 Win98
 linux commercial seamonkey build 2000-091208-m18 installed on P200 RedHat 6.2
 macos commercial seamonkey build 2000-091208-m18 installed on G3/400 OS 9.04

Verified with password and error message dialog.  Under Win32 and Linux, the 
dialog is modal except another seamonkey window can made the active window but 
the menus are disable.  Under macos, once the dialog appears, no other window 
can be made active.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.