Auto-complete suggestions are shown at a wrong position when VK is in use |
||
Issue descriptionChrome Version : 61.0.3129.0 OS Version: 9647.0.0 What steps will reproduce the problem? 1. Navigate to crbug.com and sign in with a chromium account 2. Change Status field 3. What is the expected result? Auto-complete suggestions are shown right under the input field. What happens instead of that? Auto-complete suggestions are not shown right under the input field. Please provide any additional information below. Attach a screenshot if possible. UserAgentString: Mozilla/5.0 (X11; CrOS aarch64 9647.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3129.0 Safari/537.36
,
Jul 6 2017
I was able to repro this in a minimal HTML/JS sample. There are two viewports. The main viewport is the size of the browser window. When this is occluded, there is another outer viewport that clips this. When you are scrolling, the outer smaller viewport is scrolled first, and then scroll is applied to the inner larger viewport. Generally, for autocomplete hoverboxes, CSS fixed-positioning is used, which sets an elements position relative to the viewport. In the case of keyboard occlusion, this will be the smaller outer viewport. However, the JS offset fields are based on the larger outer viewport. When the top of both viewports are lined up, then this bug does not occur. So in gmail, if you scroll to the top while the keyboard is loaded, the autocomplete aligns correctly. In tall pages that have vertical scroll, scrolling down, and then up will also fix it. I need to investigate more how the offsetTop/scrollTop is reported to the DOM/JS as the fix for this is probably always making sure this value is relative to the top left corner of the outer viewport as opposed to the occluded inner one.
,
Jul 7 2017
I now notice that absolute positioning is used in gmail (not fixed positioning), and after tracing through the source, it seems like getBoundingClientRect() is where the ideal fix should be and should return appropriate values relative to the occluded larger viewport.
,
Sep 10
blakeo@ is no longer working on virtual keyboard. Marking as available. |
||
►
Sign in to add a comment |
||
Comment 1 by satorux@chromium.org
, Jun 14 201741.5 KB
41.5 KB View Download