| Summary: | resize event is not fired while the page is still loading | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Maxim Tsoy <muodov> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, cdumez, dbates, muodov, rniwa, simon.fraser, smoley, thorton, webkit-bug-importer, wenson_hsieh, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | iPhone / iPad | ||
| OS: | Unspecified | ||
| URL: | http://x.zok.pw/ios-iframe-resize/parent.html | ||
|
Description
Maxim Tsoy
2020-10-20 05:25:08 PDT
After some more testing, I could reproduce the issue even after the iframe reached the `complete` document state, so I'm not sure if it's related to the DOM ready state. It seems to reproduce reliably on the provided test page, so hopefully it will be helpful to find the root cause. I can reproduce. The resize event also fails to trigger when rotating.
See this code in FrameView.cpp:
#if PLATFORM(IOS_FAMILY)
// Don't send the resize event if the document is loading. Some pages automatically reload
// when the window is resized; Safari on iOS often resizes the window while setting up its
// viewport. This obviously can cause problems.
if (DocumentLoader* documentLoader = frame().loader().documentLoader()) {
if (documentLoader->isLoadingInAPISense())
return;
}
#endif
That's on old change from iOS WebKit upstreaming. Could potentially be re-visited. I am able to reproduce this on iOS 16 (Safari 16) as well. >> Safari Desktop: I'm a slow child window Mon Sep 12 2022 22:41:23 GMT+0100 (British Summer Time) resize event fired Broken Image icon >> Safari iOS: I'm a slow child window Broken Image icon |