From 5fe5dd4ec7a1e6ad763cb679ace220bfe8552009 Mon Sep 17 00:00:00 2001 From: Ana <18723724+phampyk@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:50:15 +0100 Subject: [PATCH 1/3] Fix viewport for floating button Now it will work in every screen, even mobile phones. --- activity-feed.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/activity-feed.js b/activity-feed.js index c3e9be3..5ba275a 100644 --- a/activity-feed.js +++ b/activity-feed.js @@ -272,8 +272,10 @@ function createTriggerButton() { dragging = true; } if (dragging) { - const x = Math.max(0, Math.min(window.innerWidth - 40, e.clientX - offsetX)); - const y = Math.max(0, Math.min(window.innerHeight - 40, e.clientY - offsetY)); + const viewportWidth = (window.visualViewport ? window.visualViewport.width : window.innerWidth); + const x = Math.max(0, Math.min(viewportWidth - 40, e.clientX - offsetX)); + const viewportHeight = (window.visualViewport ? window.visualViewport.height : window.innerHeight); + const y = Math.max(0, Math.min(viewportHeight - 40, e.clientY - offsetY)); triggerEl.style.left = `${x}px`; triggerEl.style.top = `${y}px`; triggerEl.style.bottom = 'auto'; From e8a09ca9cf4b79ff3ef79dc07e712c1bed5eadec Mon Sep 17 00:00:00 2001 From: Ana <18723724+phampyk@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:05:03 +0100 Subject: [PATCH 2/3] Update style.css make the float button appear on mobile --- style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/style.css b/style.css index 05ba272..1f4497a 100644 --- a/style.css +++ b/style.css @@ -817,6 +817,7 @@ height: 44px; font-size: 17px; bottom: 120px; + top: 500px; } /* Mobile: full-width panel */ From 21c7cf8708f33bb8a61a03be27f7e73e57c27443 Mon Sep 17 00:00:00 2001 From: Ana <18723724+phampyk@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:15:38 +0100 Subject: [PATCH 3/3] Update style.css --- style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.css b/style.css index 1f4497a..3236cec 100644 --- a/style.css +++ b/style.css @@ -817,7 +817,7 @@ height: 44px; font-size: 17px; bottom: 120px; - top: 500px; + top: 450px; } /* Mobile: full-width panel */