Bug Tracker

Ticket #2839 (new bug)

Opened 8 months ago

Last modified 8 months ago

Dynamic adding of a remote tab causes error

Reported by: sjmittal Assigned to: klaus
Type: bug Priority: major
Milestone: 1.2.4 Component: ui
Version: 1.2.3 Keywords: ui.tabs
Cc: Needs: Review

Description

Hi, When I add a tab dynamically whose contents are to be pulled from a remote location specified by the url it causes and error. The problem is that it treats the url as callback function. In the add function following code:

if (href)

this.load(index, href);

if to be replaced by

if (href)

this.load(index);

to fix this problem.

If fix is found appropriate please include this is code.

Thanks Sachin

Attachments

jquery-ui-2839.patch (0.8 kB) - added by mdalessio 8 months ago.
Submitted patch

Change History

Changed 8 months ago by paul

  • owner changed from paul to klaus

Changed 8 months ago by mdalessio

I encountered this issue as well, which only occurs for me when trying to invoke tabs() on an empty UL.

In addition to the change made above, one other change is necessary to avoid access non-existent $.data. Full patch is attached.

Changed 8 months ago by mdalessio

Submitted patch

Changed 8 months ago by mdalessio

To reproduce this issue:

  1. invoke tabs() on an empty UL
  2. dynamically add, via tabs('add',...) a remote (Ajax) URL

And again, the above patch allows me to do this with no js errors.

Note: See TracTickets for help on using tickets.