#3139 closed bug (worksforme)
UI Tabs ajax call breaks when other ajax requests remove tabs element
Reported by: | anonymous | Owned by: | klaus.hartl |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.tabs | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The success function in the ajax call made by the ui tab code does not check to make sure the tab div still exists before populating the html. In our case if a user has made a second request which removed the tab element, the ajax call for the tab still returns and blows up the app. The offending code is the $(a.hash).html(r); call in the success function. I simply add an if($(a.hash).is(":empty") around that line in the success and this seems to fix the problem.
success: function(r, s) {
if($(a.hash).is(":empty")) {
$(a.hash).html(r);
} ...
}
Change History (4)
comment:1 Changed 15 years ago by
Milestone: | → TDB |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I also wonder how Tabs should behave in such border case. Create a new div?
Note: See
TracTickets for help on using
tickets.
Can you provide a test case? I wonder how this would break anything, because if $(a.hash) doesn't match anything, no html will be populated.