apache/cordova-ios — pull request #110 by pbenschop (2014-09-30 00:37:01+00:00)
Title: CDVWebViewDelegate fails to update the webview state properly in iOS

CDVWebViewDelegate fails to update the webview state properly in iOS when a page loads an iframe using javascript and does a redirect to another page using javascript. Method didFailLoadWithError gets called while in STATE_WAITING_FOR_LOAD_START with a NSURLErrorCancelled (-999) error. Instead of entering STATE_CANCELLED in this situation it always enters STATE_IDLE, which causes didFailLoadWithError event to never fire (which depending on the app, and definitely in our case, can cause a hang condition).

For a simplified Cordova project that reproduces the problem in the most straigth forward way possible, please refer to: https://github.com/greatvines/cordova-webview-state-bug-www