| Summary: | Viewport units are sized wrong in SFSafariViewController | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Johannes Odland <johannes.odland> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Major | CC: | a_protyasha, augus.dupin, brett567, jensimmons, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 16 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=255852 | ||
| Attachments: | |||
|
Description
Johannes Odland
2023-04-19 23:28:50 PDT
Hi. I'm so exited for Safari 17. Do you know if there are any plans on improving support for viewport units in the SFSafariViewController? This is quite problematic, as it makes both the `vh` and `lvh` unit unreliable on iOS. A fix would be much appreciated. This bug is most likely a duplicate of 261185, which has been fixed and released in iOS 17.4 and iPadOS 17.4. @Bruno, I did make some improvements here with bug 261185. How much of this still reproduces for you? Created attachment 471891 [details]
Screenshot of David Bokan’s test page
From testing with the SFSafariViewController inside Slack, it seems like the viewport units are still wrong.
Created attachment 471893 [details]
Test on iOS 18 beta 3
@Johannes, which iOS version are you testing with? Here's what I see (with SFSafariViewController) on iOS 18 beta 3.
I have tested in iOS 17.5.1. I am not able to test in later versions at the moment. However, based on your screenshot @Abrar it looks like the bug is still present in iOS 18? We can see that when the browser UI is expanded `99svh` = `99vh` = `99lvh` = `739px`, which is incorrect. `vh` and `lvh` should be relative to the large viewport, that is the viewport with the browser UI collapsed. `svh` should be relative to the small viewport, that is the viewport with the browser UI expanded (as visible on your screenshot). As far as I can tell, on your screenshot `99svh` has the correct size, but `99vh` and `99lvh` should be bigger. Created attachment 471894 [details]
Test on iOS beta 3, SFSafariViewController, no UI.
Created attachment 471895 [details]
Test on iOS beta 3, Safari, no UI.
@Bruno, Thanks for the clarification. It looks like I was holding things wrong. I've attached named screenshots with the UI retracted (in both SFSafariViewController and in Safari) -- note the difference. We need to get SFSafariViewController up-to-par with Safari here. |