tabs('length'); causes JS error on IE6/7/8
This error occurs only on Internet Explorer (all versions).
It happens when one tab existed in html prior to tabs initialization.
Checking for length on one tab which wasn't added dynamically, but was present in html causes this js error:
Error message is:
"Line: 1281
Error: 'undefined' is null or not an object"
Debugger show the following call stack:
== 1. my code: ==
tabsObject.tabs('length');
== 2. jqueryui.js: ==
$.widget = function(name, prototype) {
...
// handle getter methods
if (isMethodCall && getter(namespace, name, options, args)) {
'''var instance = $.data(this[0], name);'''
return (instance ? instance[options].apply(instance, args)
: undefined);
}
...
== 3. jquery.js ==
jQuery.extend({
cache: {},
data: function( elem, name, data ) {
elem = elem == window ?
windowData :
elem;
'''
var id = elem[ expando ];'''
== HTML code: ==
<div id="tabs">
<ul class="tab-navi">
<li><a href="#page-current">
<i class="tab-start"></i><strong>My-test-tab</strong>
<i class="tab-end"></i>
</a></li>
</ul>
<div id="page-current">
...
</div>
</div>
== Tabs init: ==
self.tabsObject.tabs
({
spinner: self.tabLoader,
tabTemplate: self.tabTemplate,
cache: true
});
Change History (4)
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Priority: |
blocker →
major
|
Resolution: |
→ invalid
|
Status: |
new →
closed
|
Not reproducible. Please provide a testpage if the issue persists.