Sign in button goes out of screen in landscape mode in Google chrome help screen |
||||||
Issue descriptionApp Version: 66.0.3335.0 canary iOS Version: 11.2.2 Device : iPhone x only Steps to reproduce : 1. Launch chrome. 2. Tap on Menu > Tap on New Incognito tab 3. Tap on Learn More. 4. Tap on Search icon in Google Chrome help screen. 5. Change the device orientation to landscape mode. Observed results: Sign in button goes out of screen. Expected results: Sign in button should fit in the screen size. Number of times you were able to reproduce: 5/5 Bug reproducible after clean install: Yes Bug reproducible after clearing cache and cookies: Yes Bug reproducible on Chrome Mobile on Android: NA Bug reproducible on Dolphin/Safari/Firefox: Safari : Works fine in safari and Firefox Bug reproducible on current stable build (App Version, iOS Version): Yes in M63 Bug reproducible on the current beta channel build (App Version, iOS Version): Yes in M64 and 65 Link to video : https://drive.google.com/file/d/1RNtBOA0w3BjtYeViMXLB3KS8PPfkbku_/view?usp=sharing
,
Jan 31 2018
,
Jan 31 2018
A couple of reasons make me suspect this may be a WebKit bug: 1) I can reproduce the behavior in a stock WKWebView as well in iPhone simulator. 2) The width of the <header> element under <div class="gaiabar"> has a CSS width property set to 100%, but the actual computed pixel value is greater than window.innerWidth after orientation change. The root cause seems related to the iPhone X notch. Because of the notch, in horizontal orientation, the visible viewport width (and window.innerWidth) is capped at 724px. However, the actual width of the WKWebView at full size is 814px. It seems that after step 5, the web content is painted assuming a window.innerWidth of 814px (hence computed width of <header> is 814px), even though window.innerWidth is actually 714px. Reloading the page (which forces relayout) fixes the problem. So I wonder if on orientation change, WebKit is not actually redoing layout, but instead just "stretches" the existing layout to fit the entire screen, but miscalculates the actual width in the process. This is just a theory for now... A not very elegant workaround in Chrome could be to force a reload. In most cases this should hit WebKit's URL cache so hopefully actual increase in network request should be low. Would it be possible to adjust WKWebView size on orientation change?
,
Jan 31 2018
It seems that the Visual Viewport support ajuma@ added to WebKit (https://bugs.webkit.org/show_bug.cgi?id=170982) may fix this issue. I tested using Chrome + WebKit built at head and can no longer reproduce this issue. Pramod, can we test this bug again when iOS 11.3 is released?
,
Jan 31 2018
Thanks Danyao! Should we mark this as ExternalDependency?
,
Jan 31 2018
Clarification on comment#4. You mean after 11.3 released to public? As of 11.3 beta#1 (15#5167f) I can still reproduce this bug.
,
Feb 15 2018
Visual Viewport API didn't make it to the iOS 11.3 beta cut. My guess would be that this will be an iOS 12 fix.
,
Oct 23
This doesn't seem to repro anymore (tested with iOS 12 on an iPhone XS). |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by sczs@chromium.org
, Jan 31 2018Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)