Skip to main content

Bug Tracker

Side navigation

#11350 closed bug (wontfix)

Opened February 15, 2012 01:55PM UTC

Closed March 05, 2012 05:01PM UTC

Problem AjaxStart - ajax synchronous mode

Reported by: elimaoliveiramaster@gmail.com Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

When the ajax is set to synchronous mode, the object #painelProcessamento is not shown after running the show() method, unless it is running in Firefox.

$("#painelProcessamento").ajaxStart(function() {

$(this).show();

}).ajaxStop(function() {

$(this).hide();

});


$.ajax({ url: url,

contentType: "application/json; charset=utf-8",

type: "POST",

dataType: "json",

data: "{" + p.urlParams + "}",

async: false,

success: function(jsonData) {

...

},

error: function() {

...

}

});

Attachments (0)
Change History (4)

Changed February 15, 2012 02:10PM UTC by jaubourg comment:1

You can't have your cake and eat it.

Synchronous requests will block the Javascript VM so events won't be fired in a timely fashion. Firefox's behaviour in that instance is quite worrisome.

If you show a panel to avoid interaction (I suppose?) why are you making a synchronous request?

Changed February 15, 2012 02:32PM UTC by elimaoliveiramaster@gmail.com comment:2

Just to show the user that the system is not locked in the event of any delay in processing.

Changed February 15, 2012 02:50PM UTC by elimaoliveiramaster@gmail.com comment:3

Replying to [comment:1 jaubourg]:

You can't have your cake and eat it. Synchronous requests will block the Javascript VM so events won't be fired in a timely fashion. Firefox's behaviour in that instance is quite worrisome. If you show a panel to avoid interaction (I suppose?) why are you making a synchronous request?
  • Just to show the user that the system is not locked in the event of any delay in processing.

Changed March 05, 2012 05:01PM UTC by addyosmani comment:4

component: unfiledajax
priority: undecidedlow
resolution: → wontfix
status: newclosed

This personally looks more like an inconsistency in how FF is handling the issue rather than something directly being approached incorrectly by jQuery core. Unless there are actions we want to take on how synchronous mode currently works, closing as wontfix.