Opened 15 years ago
Closed 15 years ago
#1845 closed bug (fixed)
Tabs - Openning multiple AJAX tabs causes spinner to not be removed
Reported by: | hiro | Owned by: | klaus |
---|---|---|---|
Priority: | minor | Milestone: | 1.2.2 |
Component: | ui | Version: | 1.2.1 |
Keywords: | tabs | Cc: | |
Blocked by: | Blocking: |
Description
Using Tabs 3 which can be seen demoed on the test page: http://stilbuero.de/jquery/tabs_3/
Under "Ajax tabs"
Click tab Two then click tab Three very quickly before tab two finishes loading. Notice how the Loading... spinner dialog doesn't not get updated with the proper text? The spinner logo is removed on all tabs, but tab Two remains with the spinner text.
This appears to be caused around line 449 of ui.tabs.js by $span not being a direct pointer to each tab, but of the last one?
I believe I have a somewhat crude fix for this:
from line 442:
load if (o.spinner) {
$span.attr('text', $span.html());
$span.html('<em>' + o.spinner + '</em>');
}
setTimeout(function() { $(a.hash).load(url, function() {
if (o.spinner) {
tab_contents_id = "a[href='#"+a.href.split('#')[1]+"'] span"; $(tab_contents_id).html($(tab_contents_id).attr('text'));
} $a.removeClass(o.loadingClass);
...
This seems to solve the problem with my test case...
Attachments (1)
Change History (3)
Changed 15 years ago by
Attachment: | ui.tabs.js added |
---|
comment:1 Changed 15 years ago by
Owner: | set to klaus |
---|
Modified version with ajax fix.