mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 353560 - Unknown Content dialog not dismissed when filepicker opens. r=gavin.
This commit is contained in:
parent
7d6ef1a6a2
commit
732a4054e9
@ -858,7 +858,7 @@ nsUnknownContentTypeDialog.prototype = {
|
||||
// Remove our web progress listener (a progress dialog will be
|
||||
// taking over).
|
||||
this.mLauncher.setWebProgressListener(null);
|
||||
|
||||
|
||||
// saveToDisk and launchWithApplication can return errors in
|
||||
// certain circumstances (e.g. The user clicks cancel in the
|
||||
// "Save to Disk" dialog. In those cases, we don't want to
|
||||
@ -885,7 +885,12 @@ nsUnknownContentTypeDialog.prototype = {
|
||||
|
||||
this.mLauncher.saveToDisk(targetFile, false);
|
||||
#endif
|
||||
this.mLauncher.saveToDisk(null, false);
|
||||
// Since saveToDisk may open a file picker and therefore block this routine,
|
||||
// we should only call it once the dialog is closed.
|
||||
var _delayedSaveToDisk = function(aSelf) {
|
||||
aSelf.mLauncher.saveToDisk(null, false);
|
||||
}
|
||||
this.mDialog.opener.setTimeout(_delayedSaveToDisk, 0, this);
|
||||
}
|
||||
else
|
||||
this.mLauncher.launchWithApplication(null, false);
|
||||
|
Loading…
Reference in New Issue
Block a user