From 18197044382034fb26ef862e8d88b89c4e14593b Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Wed, 17 Oct 2007 04:03:17 -0400
Subject: [PATCH] Make sure the _main_ window is focussed (closes #1484138).

---
 program/js/app.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index b2e7dde..86d2eb6 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -203,8 +203,11 @@
 
         this.set_page_buttons();
 
-        // focus this window
-        window.focus();
+        // focus main window
+        if (this.env.framed && window.parent)
+          window.parent.focus();
+        else
+          window.focus();
 
         // init message compose form
         if (this.env.action=='compose')

--
Gitblit v1.9.1