Related to issue 22376: Improved classic tabs opening with IE10
authorDavid Baz Fayos <david.baz@openbravo.com>
Wed, 28 Aug 2013 00:13:54 +0200
changeset 21039 aa3e09dbd8a8
parent 21038 ea140535a56f
child 21040 2ca13963417f
Related to issue 22376: Improved classic tabs opening with IE10
although the problem is not yet completly fixed, since there could be
sequences where you get empty tabs, but now is a more corner case
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Tue Aug 27 16:12:45 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Wed Aug 28 00:13:54 2013 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -75,6 +75,12 @@
   },
 
   tabDeselected: function (tabNum, tabPane, ID, tab, newTab) {
+    if (navigator.userAgent.indexOf('Trident/6.0') !== -1) {
+      // To fix a problem with Internet Explorer 10 and classic OB windows: http://forums.smartclient.com/showthread.php?t=27389
+      if (tabPane.viewId === 'OBClassicWindow' || tabPane.viewId === 'ClassicOBHelp') {
+        tabPane.sendToBack();
+      }
+    }
     if (tabPane.tabDeselected) { //Redirect if tabPane has its own tabDeselected handler
       tabPane.tabDeselected(tabNum, tabPane, ID, tab, newTab);
     }