Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#2839 closed bug (worksforme)

Dynamic adding of a remote tab causes error

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

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 (1)

jquery-ui-2839.patch (801 bytes) - added by mdalessio 11 years ago.
Submitted patch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by paul

Owner: changed from paul to klaus

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

Attachment: jquery-ui-2839.patch added

Submitted patch

comment:3 Changed 11 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 11 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:5 Changed 11 years ago by paul

Component: ui.coreui.tabs
Version: 1.2.31.5b4

comment:6 Changed 11 years ago by Scott González

Resolution: worksforme
Status: newclosed

I can't reproduce this problem.

mdalessio: I think instantiating tabs on an empty list is invalid. Tabs always have a exactly one panel showing. If you have an empty list, that's not possible. If you strongly disagree with this, please create a new ticket and the UI team can reconsider this.

Note: See TracTickets for help on using tickets.