From f021a1c0db968d267e6e6fa423b494378d7fa065 Mon Sep 17 00:00:00 2001 From: 1001Rem Date: Tue, 2 Dec 2025 14:27:59 +0300 Subject: [PATCH] Fix: Navbar clipping outside of viewport on mobile (#433) --- src/components/Navbar/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index a4875115..5531d655 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -102,6 +102,15 @@ const Navbar = () => { .click() } } + + /* + auto-scroll textarea into view if mobile keyboard is blocking textarea to prevent + page resize and navbar from snapping out of viewport due to using fixed heights + */ + window.visualViewport?.addEventListener("resize", () => { + window.scrollTo(0, 0); + }); + const disconnectNow = () => { const formData = new FormData() formData.append("DISCONNECT", "YES")