summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-01-11 15:12:33 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-01-11 15:13:20 +0100
commit7cc1d3ae170b63c5f477db4eda09b94ab42d1bb5 (patch)
tree4beb2bafa5a0570b6985d876e7a09a041c83ff35 /program/js
parent9d318f5347adcab931b58b592dd09eddb9cdc60e (diff)
Fix opener check in extwin (avoid JS errors in IE when opener is gone); always close extwin, even if opener isn't available anymore
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js
index c627983f4..c1ea2be3a 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3037,7 +3037,7 @@ function rcube_webmail()
ac_props;
// close compose step in opener
- if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') {
+ if (window.opener && !window.opener.closed && opener.rcmail && opener.rcmail.env.action == 'compose') {
setTimeout(function(){ opener.history.back(); }, 100);
this.env.opened_extwin = true;
}
@@ -3707,9 +3707,10 @@ function rcube_webmail()
{
this.display_message(msg, type);
- if (this.env.extwin && window.opener && opener.rcmail) {
+ if (this.env.extwin) {
this.lock_form(this.gui_objects.messageform);
- opener.rcmail.display_message(msg, type);
+ if (window.opener && !window.opener.closed && opener.rcmail)
+ opener.rcmail.display_message(msg, type);
setTimeout(function(){ window.close() }, 1000);
}
else {