diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index fc60e8b..88c6a05 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -2,11 +2,27 @@ import ChatApp from './lib/ChatApp.svelte'; import BackButton from "./lib/BackButton.svelte"; import "./assets/app.css" + import { onMount } from 'svelte'; + + let isKeyboardActive = false; + + function handleResize() { + const isVirtualKeyboardActive = window.innerHeight < window.outerHeight; + isKeyboardActive = isVirtualKeyboardActive; + } + + onMount(() => { + window.addEventListener('resize', handleResize); + return () => { + window.removeEventListener('resize', handleResize); + }; + }); +
- +
@@ -15,5 +31,13 @@
diff --git a/frontend/src/assets/app.css b/frontend/src/assets/app.css index eae61f3..74b16f5 100644 --- a/frontend/src/assets/app.css +++ b/frontend/src/assets/app.css @@ -15,6 +15,7 @@ } #chat-container { + padding-top: 2.52rem; overflow-y: auto; display: flex; flex-direction: column; @@ -22,6 +23,7 @@ } #header { + background: white; /* make header fixed to top when the content bellow starts scrolling */ position: fixed; top: 0;