When using a fixed-position HTML navbar (e.g., position: fixed; top: 0) in Normal Mode with edge-to-edge enabled, the navbar scrolls with the page content instead of staying pinned to the top.
This happens because contentInsetAdjustmentBehavior = .never on the WKWebView means the scroll view doesn't account for fixed elements in the same way a native navigation bar would.
To reproduce:
- Create a Normal Mode app with a fixed HTML navbar (no native navbar)
- Add enough content to scroll
- Scroll down — the fixed navbar moves with the content
Visible in: Habits demo app
Workaround: Use a native navbar (native_navbar_tag) instead of an HTML fixed navbar.
When using a fixed-position HTML navbar (e.g.,
position: fixed; top: 0) in Normal Mode with edge-to-edge enabled, the navbar scrolls with the page content instead of staying pinned to the top.This happens because
contentInsetAdjustmentBehavior = .neveron the WKWebView means the scroll view doesn't account for fixed elements in the same way a native navigation bar would.To reproduce:
Visible in: Habits demo app
Workaround: Use a native navbar (
native_navbar_tag) instead of an HTML fixed navbar.