Stop page scrolling
Sometimes an input we are focusing on is considered out of the viewport by the browser. This is not always the case, and, even when it is, it's not trivial to move it back in. Instead, this change detects scrolling and re-scrolls the view to 0, 0. Doing so is not without consequence, as there is a slight jitter before we can scroll back, however this is substantially better than having the controls off-the-page. Signed-off-by: Skyler <skyler.grey@collabora.com> Change-Id: Ie5003f9244ce1c0e8a183de5fdbcf3a880b13a13pull/9004/head
parent
fcfb95638f
commit
3dd2087bae
|
@ -1285,6 +1285,7 @@ window.app = {
|
|||
function handleViewportChange(event) {
|
||||
var visualViewport = event.target;
|
||||
|
||||
window.scroll(0, 0);
|
||||
document.body.style.height = visualViewport.height + 'px';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue