WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 131863
Bug 127771
Layout recalculation makes viewport height equal to content height, impacting viewport-relative vh units.
https://bugs.webkit.org/show_bug.cgi?id=127771
Summary
Layout recalculation makes viewport height equal to content height, impacting...
Paulo Pereira
Reported
2014-01-28 03:37:38 PST
This GitHub issue explains the issue in detail, with code examples and screenshots:
https://github.com/scottjehl/Device-Bugs/issues/36#issuecomment-33470005
Short explanation: Using vh units on Mobile Safari, such as on a 'max-height: 50vh' declaration, doesn't have the expected result. I’ve found the cause for this to be not the units themselves, but the viewport height that the units are relative too. This viewport height works as expected until any user or code-triggered event forces a layout recalculation — this can be a device orientation change or JS code such as Typekit. When this happens, the viewport height appears to be set to the content height (I say appear because the visible area does not change). This causes viewport-relative units to have a value relative to the new viewport height, which is now the content-height, making them much much larger than intended, whereas these units are expected to work relative to the viewport height, usually the device height. How to reproduce: 1. Use any viewport height relative value in an document element. 2. Trigger any layout-recalculating event, such as an orientation change, or some cases of JavaScript code. 3. Watch the height of said element change.
Attachments
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2014-06-11 15:14:51 PDT
Tim fixed this :) *** This bug has been marked as a duplicate of
bug 131863
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug