Skip to main content

Search and Top Navigation

#6144 closed bug (wontfix)

Opened October 04, 2010 02:08PM UTC

Closed May 18, 2011 12:51PM UTC

tabs ajaxOptions should extend $.ajaxSettings

Reported by: dmuir Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.tabs Version: 1.8.5
Keywords: Cc:
Blocked by: Blocking:
Description

Because of the way that tabs initiates an ajax request for tab content, the default ajax success and error handlers are lost.

To get them back I need to do:

$('.tabs').tabs({
ajaxOptions: {
    success : $.ajaxSettings.success,
    error   : $.ajaxSettings.error
}
});

Would be nice if the defaults actually acted as defaults rather than having to explicitly tell it to use it.

Attachments (0)
Change History (2)

Changed March 28, 2011 04:36PM UTC by gnarf comment:1

http://jsfiddle.net/gnarf/dYaSq/ Shows us some weird behavior with this for sure... However I'd like to point out the suggestion from http://api.jquery.com/jQuery.ajaxSetup:

 Note: Global callback functions should be set with their respective global Ajax event handler methods—.ajaxStart(), .ajaxStop(), .ajaxComplete(), .ajaxError(), .ajaxSuccess(), .ajaxSend()—rather than within the options object for $.ajaxSetup(). 

Also note that it appears for some reason the ajaxSuccess is being called twice...

Changed May 18, 2011 12:51PM UTC by scottgonzalez comment:2

milestone: TBD1.9
resolution: → wontfix
status: newclosed

ajaxOptions is being deprecated and fixing this could be a breaking change. The new API doesn't have this problem.