GitHub user pbenschop opened a pull request:

    https://github.com/apache/cordova-ios/pull/110

    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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/greatvines/cordova-ios 
cordova-webview-state-bug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-ios/pull/110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #110
    
----
commit 953e709db3e3567e66670a995ac3ed14f9010d95
Author: pbenschop <[email protected]>
Date:   2014-09-30T00:31:30Z

    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 
straigtforward
    way possible, please refer to: 
https://github.com/greatvines/cordova-webview-state-bug-www

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to