JavaScript error from IE during tab abjustment
----------------------------------------------

                 Key: SHINDIG-689
                 URL: https://issues.apache.org/jira/browse/SHINDIG-689
             Project: Shindig
          Issue Type: Improvement
          Components: Features (Javascript)
         Environment: IE
            Reporter: David Citron
            Priority: Critical


Adding and removing tabs under IE can cause JavaScript errors when attempting 
to update the Tab container "scrollLeft" property.

Apparently there are circumstances where gadgets.TabSet.adjustNavigation() can 
be invoked and the tabsContainer_.scrollWidth property is not writable. The 
following patch appears to fix the issue:

Index: tabs/tabs.js
===================================================================
--- tabs/tabs.js        (revision 709235)
+++ tabs/tabs.js        (working copy)
@@ -503,19 +503,51 @@
   this.leftNavContainer_.style.display = 'none';
   this.rightNavContainer_.style.display = 'none';
   if (this.tabsContainer_.scrollWidth <= this.tabsContainer_.offsetWidth) {
-    this.tabsContainer_.scrollLeft = 0;
+    if(this.tabsContainer_.scrollLeft) {
+      // to avoid JS error in IE
+      this.tabsContainer_.scrollLeft = 0;
+    }
     return;
   }
 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to