summaryrefslogtreecommitdiff
path: root/web/static
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-16 23:16:01 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-16 23:16:01 -0700
commit9072b791c461863aedc85e070a59259f1d15bdaa (patch)
treec1ac1c9e2bd5a202e9f23229d84e1b801b6768e6 /web/static
parent270dd272f5fd2e9c7e178ba31c561e41d820608a (diff)
downloaddartboat-9072b791c461863aedc85e070a59259f1d15bdaa.tar.gz
dartboat-9072b791c461863aedc85e070a59259f1d15bdaa.tar.xz
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.
Diffstat (limited to 'web/static')
-rw-r--r--web/static/dartboat.js3
-rw-r--r--web/static/sw.js2
2 files changed, 4 insertions, 1 deletions
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) {
diff --git a/web/static/sw.js b/web/static/sw.js
index 3e3ccfd..a5fe6fc 100644
--- a/web/static/sw.js
+++ b/web/static/sw.js
@@ -1,5 +1,5 @@
const CACHE_PREFIX = 'dartboat-'
-const CACHE_VERSION = '12';
+const CACHE_VERSION = '13';
const CACHE_NAME = `${CACHE_PREFIX}${CACHE_VERSION}`;
const CACHE_FILES = [