From 9072b791c461863aedc85e070a59259f1d15bdaa Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 16 May 2022 23:16:01 -0700 Subject: web: overlay virtual keyboard on chrome This prevents everything from getting resized when an input field is focused. Ideally we'd make the page scrollable when the keyboard appears, but the inputs are all at the top so it's not crucial. --- web/static/dartboat.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'web/static/dartboat.js') diff --git a/web/static/dartboat.js b/web/static/dartboat.js index 9e97dfc..a46ffc9 100644 --- a/web/static/dartboat.js +++ b/web/static/dartboat.js @@ -199,6 +199,9 @@ document.addEventListener('keydown', e => { if ('serviceWorker' in navigator) navigator.serviceWorker.register('sw.js'); +if ('virtualKeyboard' in navigator) + navigator.virtualKeyboard.overlaysContent = true; + // disable back button when installed as a PWA. a single click exits the app, // destroying match state without confirmation, so we must resort to this. if (window.matchMedia('(display-mode: standalone)').matches) { -- cgit v1.2.3-70-g09d2