-
Type:
Bug
-
Status: Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Javascript
-
Labels:None
-
Environment:IE
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;
}