Bug 220623 - onpagehide/onpageshow event listeners on WKWebView with bfcache intermittently not firing
Summary: onpagehide/onpageshow event listeners on WKWebView with bfcache intermittentl...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-14 06:15 PST by chris.boakes
Modified: 2021-01-29 13:11 PST (History)
6 users (show)

See Also:


Attachments
Demonstration of the events not firing as expected (9.01 MB, video/quicktime)
2021-01-14 06:15 PST, chris.boakes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description chris.boakes 2021-01-14 06:15:43 PST
Created attachment 417613 [details]
Demonstration of the events not firing as expected

Have isolated the problem and can be seen here: https://lucid-shaw-b293da.netlify.app/

In WebView browser:

1. Navigate to Page 1
2. You should see the console.log “onpageshow - page 1, load”
3. Navigate to Page 2 
4. You should see the console.log “onpageshow - page 2, load”
5. Use the back button and you should see the console.log “onpageshow - page 1, load”
6. Go back and forth between Page 1 and 2 and the console logs intermittently do not fire

The expected behavior is that the onpageshow and onpagehide to fire every time but the events do not always fire when navigating backwards to a cached page
Comment 1 Radar WebKit Bug Importer 2021-01-21 06:16:15 PST
<rdar://problem/73450015>