From d244f5fa475cf0b4ff07926299ac9185f9fb7697 Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Fri, 3 Mar 2023 12:03:20 +0100 Subject: [PATCH] fix circles position on ios safari are shifted by url bar --- public/scripts/ui.js | 4 ++-- public_included_ws_fallback/scripts/ui.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/scripts/ui.js b/public/scripts/ui.js index 4f2c167..c48ac70 100644 --- a/public/scripts/ui.js +++ b/public/scripts/ui.js @@ -1779,8 +1779,8 @@ Events.on('load', () => { let x0, y0, w, h, dw, offset; function init() { - w = window.innerWidth; - h = window.innerHeight; + w = document.documentElement.clientWidth; + h = document.documentElement.clientHeight; c.width = w; c.height = h; offset = $$('footer').offsetHeight - 32; diff --git a/public_included_ws_fallback/scripts/ui.js b/public_included_ws_fallback/scripts/ui.js index 0df8e81..76148c2 100644 --- a/public_included_ws_fallback/scripts/ui.js +++ b/public_included_ws_fallback/scripts/ui.js @@ -1780,8 +1780,8 @@ Events.on('load', () => { let x0, y0, w, h, dw, offset; function init() { - w = window.innerWidth; - h = window.innerHeight; + w = document.documentElement.clientWidth; + h = document.documentElement.clientHeight; c.width = w; c.height = h; offset = $$('footer').offsetHeight - 32;