Search and Top Navigation
#4487 closed bug (notabug)
Opened April 20, 2009 09:40AM UTC
Closed May 11, 2009 12:53PM UTC
tabs('length'); causes JS error on IE6/7/8
Reported by: | mg | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | ui.tabs | Version: | 1.7.1 |
Keywords: | ie, tabs | Cc: | mg@artigo.pl, mh@artigo.pl |
Blocked by: | Blocking: |
Description
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 });
Attachments (0)
Change History (4)
Changed May 07, 2009 01:38PM UTC by comment:1
milestone: | 1.7.2 → 1.8 |
---|
Changed May 11, 2009 12:47PM UTC by comment:2
description: | 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 \ }); \ \ → 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 \ }); \ \ |
---|
Changed May 11, 2009 12:49PM UTC by comment:3
description: | 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 \ }); \ \ → 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 \ }); \ \ }}} |
---|
Changed May 11, 2009 12:53PM UTC by comment:4
priority: | blocker → major |
---|---|
resolution: | → invalid |
status: | new → closed |
Not reproducible. Please provide a testpage if the issue persists.