Bug 200640
Summary: | closing tab bar created by target=_blank does not recalculate viewport height | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jordan Nelson <shortsands.ceo> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ahmad.saleem792, bfulgham, diego, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 12 | ||
Hardware: | Mac | ||
OS: | macOS 10.13 |
Jordan Nelson
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15"
main piece of content has a min-height: 100vh;
When opening up another tab manually, the view port height shrinks because the tab bar takes up some space. When the recently opened tab is closed, the tab bar disappears and the view port height expands naturally. The content height expands to fill the expanded view port.
When clicking on an <a> tag with target="_blank", the tab bar appears because a new tab is there. When closing the tab the view port height expands normally but the content height is not recalculated and a white space, the size of the former tab bar exists under the content.
Loom video: https://www.loom.com/share/3e942cc998ca422eaee9f6cc6eb0f2f4
password: webkit
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/54222312>
Ahmad Saleem
Can you share reproducible test case for the example shown in the video?
Diego Vogel
Not sure if this is the same bug, but here's a CodePen demonstrating that WebKit ignores the address bar when calculating vh units.
https://cdpn.io/pen/debug/NWZPmdV/907e34566258745569a61da18ef3d554
If this is a different problem I can open a separate ticket.
Diego Vogel
Update: the same thing happens in Chrome and Firefox on Android. So maybe my issue isn't a bug.