2

I have a single page web app that has very little to load initially and all subsequent data is loaded via ajax. During the wait I use CSS to show a wait cursor, but this doesn't affect the tab loading animation. For some reason, after sitting idle for a while, the tab will show a wait animation that never goes away. I can't find any information on what causes this behavior. I doubt it has to do with my waiting routine, but here it is....

Javascript:

// GET JSON DATA FROM CGI
queryData = function (action, queryObj, callback) {
    // make sure query not blank
    if ($.map(queryObj, function (val) { return val !== "" }).some(function (el) { return el })) {
        queryObj.action = action;
        $('body').addClass('wait');
        $.getJSON(cgi_src, queryObj, function (result) {
            callback(result);
        }).fail(function () {
            alert("QUERY FAILED");
        }).always(function () {
            $('body').removeClass('wait');
        });
    }
};

CSS:

.wait, .wait * { cursor: wait !important; }
robisrob
  • 940
  • 12
  • 23
  • 1
    Do you see any pending requests in the network tab of the dev tools? Can you reproduce the issue in an incognito window? – Joel Nov 13 '14 at 22:08

0 Answers0