Bug Tracker

Modify

Ticket #2839 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

Dynamic adding of a remote tab causes error

Reported by: sjmittal Owned by: klaus
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: ui.tabs Cc:
Blocking: Blocked by:

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 Download (801 bytes) - added by mdalessio 5 years ago.
Submitted patch

Change History

comment:1 Changed 5 years ago by paul

  • Owner changed from paul to klaus

comment:2 Changed 5 years 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 5 years ago by mdalessio

Submitted patch

comment:3 Changed 5 years 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.

comment:4 Changed 4 years ago by klaus

  • Status changed from new to closed
  • Resolution set to fixed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.