Bug 152032 - -[WKNavigationDelegate webView:didFinishNavigation:] can be called before the main frame load is complete.
Summary: -[WKNavigationDelegate webView:didFinishNavigation:] can be called before the...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Safari 9
Hardware: iPhone / iPad iOS 9.0
: P2 Normal
Assignee: Nobody
URL: nytimes.com
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-08 19:02 PST by gchatz
Modified: 2015-12-09 19:30 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gchatz 2015-12-08 19:02:57 PST
Summary:
When navigating to web sites, the didFinishNavigation callback from WKNavigationDelegate can be called before the main frame load completes, which is not allowed according to the documentation. I have seen this happen with sites like nytimes.com, techmeme.com, and gmail.com.

Steps to Reproduce:
1. Put a breakpoint on the didFinishNavigation method.
2. Run app using WKWebView.
3. Navigate to nytimes.com.

Expected Results:
Breakpoint is hit, and the nytimes.com main frame is fully loaded.

Actual Results:
Breakpoint is hit, but the nytimes.com main frame is not fully loaded. 

Version:
iOS 9.1

Is there a suggested workaround?
Comment 1 gchatz 2015-12-08 19:04:51 PST
Associated radar: rdar://23815031

This happens on iPad and iPhone, most dramatically on iPad.