#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)
Change History (7)
comment:1 Changed 15 years ago by
Owner: | changed from paul to klaus |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
To reproduce this issue:
- invoke tabs() on an empty UL
- dynamically add, via tabs('add',...) a remote (Ajax) URL
And again, the above patch allows me to do this with no js errors.
comment:5 Changed 15 years ago by
Component: | ui.core → ui.tabs |
---|---|
Version: | 1.2.3 → 1.5b4 |
comment:6 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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.
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.