Opened 15 years ago
Closed 15 years ago
#3181 closed bug (invalid)
UI Tabs ajax call breaks when other ajax requests remove tabs element
Reported by: | jhughes | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | plugin | Version: | 1.2.6 |
Keywords: | ui tab | 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 wrapped everything in the success function in an if($(a.hash) == null) and this seems to have fixed the problem.
success: function(r, s) {
if($(a.hash) == null) {
$(a.hash).html(r); cleanup();
... }
}
Change History (2)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
This belongs to jQuery UI. Please repost this to the UI Bug Tracker.
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 wrapped everything in the success function in an if($(a.hash).is(":empty") and this seems to have fixed the problem.
success: function(r, s) {
}