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 nsNntpService::CancelMessages(). 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.
re-assigning to me....these bugs are getting nsbeta2 plussed to nominating as such.
Putting on [nsbeta2+] radar for beta2 fix.
Per scott on verification: code inspection is the only way. I'd suggest getting an engineer who is helping you verify bugs to look at them.
Could you suggest a way to cause this wanna-be modal-dialog to appear? With that info, it should be possible to verify that the dialog is properly attached (parented) by trying to raise the parent and obscure the child (you shouldn't be able to do this). Thanks, Jim
Sure! For news, try deleting a message (via the menu item) that isn't a news article you wrote. That forces you to get a dialog saying you can't delete this article I believe. That modal dialog is parented with the mail 3-pane window underneath it.
Verified on Win NT, using build 2000080204 (M17 beta2 branch).
verified code diff + Jim's testimony above.
Thank you everyone for helping on this bug verification.