From 838e4204b161b00b0978038b2dcf42b396e8d400 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 24 Oct 2012 16:53:10 +0200 Subject: Fix new (empty) window opening on FF and others --- program/js/app.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 2c0cf6c39..b73148219 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -575,7 +575,7 @@ function rcube_webmail() var prevstate = this.env.compose_extwin; $("input[name='_action']", this.gui_objects.messageform).val('compose'); this.gui_objects.messageform.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 }); - this.gui_objects.messageform.target = this.open_window('about:blank', 1150, 900); + this.gui_objects.messageform.target = this.open_window('', 1150, 900); this.gui_objects.messageform.submit(); } else { @@ -1672,8 +1672,15 @@ function rcube_webmail() t = Math.max(0, (screen.height - h) / 2 + (screen.top || 0) - 20); var wname = 'rcmextwin' + new Date().getTime(), - extwin = window.open(url + '&_extwin=1', wname, 'width='+w+',height='+h+',top='+t+',left='+l); + extwin = window.open(url + '&_extwin=1', wname, 'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,toolbar=no,status=no'); extwin.moveTo(l,t); + + // write loading... message to empty windows + if (!url && extwin.document) { + extwin.document.write('' + this.get_label('loading') + ''); + } + + // focus window, delayed to bring to front window.setTimeout(function(){ extwin.focus(); }, 10); return wname; -- cgit v1.2.3