Permalink
Browse files

sw-ajax.js: Stop "throbbing of doom" on Android devices and at the same

time make sure the Comet (AJAX long poll) doesn't recurse until a stack
overflow.

I've never seen this actually happen, but anyway.
  • Loading branch information...
1 parent 7eb2822 commit 94692aab935a618f9e79ed3d52f6f40ed0bae9fc @lnostdal committed Apr 30, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 resources/js/sw-ajax.js
View
@@ -175,12 +175,8 @@ var swComet =
},
complete: callback});
}
-
- if($.browser.mozilla || $.browser.webkit)
- // Stops "throbbing of doom".
- return function(params){ setTimeout(function(){ doIt(params); }, 0); };
- else
- return doIt;
+ // Stops "throbbing of doom" and ensure we do not recurse until a stack overflow.
+ return function(params){ setTimeout(function(){ doIt(params); }, 0); };
})();

0 comments on commit 94692aa

Please sign in to comment.