Steps to reproduce:
- Open any article with images on iPad Pro 13" (or iPad Air 13") in landscape orientation
- Ensure the Table of Contents sidebar is visible in the left column
- Scroll down (tab bar hides) then scroll back up (tab bar shows)
Expected: Images maintain their size
Actual: Images jump between two sizes on each scroll direction change, disrupting the page layout and causing loss of reading position
Root cause:
When the tab bar hides/shows, adjustedContentInset.top changes, which changes window.innerHeight inside the WKWebView. With the TOC sidebar visible, the web view is 2/3 of the screen width (~917pt on 13" iPads), making the viewport nearly square. The innerHeight change (between ~872 and ~936) flips the CSS @media (orientation:...) query, causing images to toggle between the width:50% (landscape) and width:60% (tablet) PCS rules.
Only affects 13" iPads because on smaller iPads, the 2/3-width web view always exceeds innerHeight, keeping CSS orientation stable.
Affects: iOS 18+, iPad Pro/Air 13", landscape with TOC visible
Test Notes
In TestFlight 7.9.2 (5975)