From 8b7f5a3792d1514b7c0310c0f1dc5139958c1502 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Wed, 17 Sep 2008 07:22:05 -0400
Subject: [PATCH] Workaround a (possible) IE bug (#1485309).

---
 program/js/common.js |    1 +
 program/js/app.js    |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 1ee319b..0f074f3 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1240,6 +1240,18 @@
         if (this.env.mailbox.indexOf(id + this.env.delimiter) == 0)
           this.command('list', id);
         }
+
+      // Work around a bug in IE6 and IE7, see #1485309
+      if ((bw.ie6 || bw.ie7) &&
+          li.nextSibling &&
+          (li.nextSibling.getElementsByTagName("ul").length>0) &&
+          li.nextSibling.getElementsByTagName("ul")[0].style &&
+          (li.nextSibling.getElementsByTagName("ul")[0].style.display!='none'))
+        {
+          li.nextSibling.getElementsByTagName("ul")[0].style.display = 'none';
+          li.nextSibling.getElementsByTagName("ul")[0].style.display = '';
+        }
+
       this.http_post('save-pref', '_name=collapsed_folders&_value='+escape(this.env.collapsed_folders));
       this.set_unread_count_display(id, false);
       }
diff --git a/program/js/common.js b/program/js/common.js
index be98feb..5049061 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -49,6 +49,7 @@
   this.ie4 = (this.ie && !this.dom);
   this.ie5 = (this.dom && this.appver.indexOf('MSIE 5')>0);
   this.ie6 = (this.dom && this.appver.indexOf('MSIE 6')>0);
+  this.ie7 = (this.dom && this.appver.indexOf('MSIE 7')>0);
 
   this.mz = (this.dom && this.ver>=5);  // (this.dom && this.product=='Gecko')
   this.ns = ((this.ver<5 && this.name=='Netscape') || (this.ver>=5 && this.vendor.indexOf('Netscape')>=0));

--
Gitblit v1.9.1