Bug Tracker

Opened 10 years ago

Closed 10 years ago

#11350 closed bug (wontfix)

Problem AjaxStart - ajax synchronous mode

Reported by: [email protected] 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() {

...

}

});

Change History (4)

comment:1 Changed 10 years ago by 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?

comment:2 Changed 10 years ago by [email protected]

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

comment:3 in reply to:  1 Changed 10 years ago by [email protected]

Replying to 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.

comment:4 Changed 10 years ago by addyosmani

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.

Note: See TracTickets for help on using tickets.