Merge pull request #637 from dharrya/fix-navigation
ref #637: checkStep turns into an infinite loop when navigationLocked == true
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -2435,11 +2435,12 @@ function createPage(casper) { | ... | @@ -2435,11 +2435,12 @@ function createPage(casper) { |
2435 | newUrl = newUrl.substring(0, pos); | 2435 | newUrl = newUrl.substring(0, pos); |
2436 | } | 2436 | } |
2437 | // for URLs that are only different by their hash part | 2437 | // for URLs that are only different by their hash part |
2438 | // or if navigation locked (willNavigate == false) | ||
2438 | // don't turn navigationRequested to true, because | 2439 | // don't turn navigationRequested to true, because |
2439 | // there will not be loadStarted, loadFinished events | 2440 | // there will not be loadStarted, loadFinished events |
2440 | // so it could cause issues (for exemple, checkStep that | 2441 | // so it could cause issues (for exemple, checkStep that |
2441 | // do no execute the next step -> infinite loop on checkStep) | 2442 | // do no execute the next step -> infinite loop on checkStep) |
2442 | if (currentUrl !== newUrl) | 2443 | if (willNavigate && currentUrl !== newUrl) |
2443 | casper.navigationRequested = true; | 2444 | casper.navigationRequested = true; |
2444 | 2445 | ||
2445 | if (willNavigate) { | 2446 | if (willNavigate) { | ... | ... |
-
Please register or sign in to post a comment