Skip to content
This repository
Browse code

work around Chrome bug where Ajax callback fires more than once

The bug is present in Chrome 23.0.1271.64 and possibly iOS 6, and is
reproducible using the debugger but otherwise occurs randomly.

References #633

http://code.google.com/p/chromium/issues/detail?id=159827
  • Loading branch information...
commit 8e84f2e52a007b0f1fea740c49d5e669adc3a3dc 1 parent 228337f
Jeff jsnuggle authored mislav committed

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  src/ajax.js
1  src/ajax.js
@@ -195,6 +195,7 @@
195 195
196 196 xhr.onreadystatechange = function(){
197 197 if (xhr.readyState == 4) {
  198 + xhr.onreadystatechange = empty;
198 199 clearTimeout(abortTimeout)
199 200 var result, error = false
200 201 if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {

1 comment on commit 8e84f2e

Jackson Tian

This issue break me one hour. Thanks.

Please sign in to comment.
Something went wrong with that request. Please try again.