Mobile virtual-keyboard pushes up content

I have an html layout / css problem in a basic chat application.
There is a page with a chat-header a chat-body and a chat-footer.
Body contains the messages, it is scrollable, the footer contains the text input.
When the user clicks on the text input, the entire content is pushed up on mobile, and i can't see my header.

Here is a snippet


body{
        display: flex;
        flex-direction: column;
        padding: 0px;
        margin: 0px;
        overflow: hidden;
        position: fixed;
        top: 0px;
        left: 0px;
        height: 100svh;
    }

    .chat {
        flex-grow: 1;
        overflow: auto;
        padding: 15px;
    }

    .footer,
    .header {
        padding: 15px;
        background-color: cornflowerblue;
        color: white;
    }



    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        
        <div class="header">
            <button>Menu</button>
        </div>
        <div class="chat">
          <!-- loremx500 -->
</div>
        <div class="footer">
            <input type="text" placeholder="Type here..." name="" id="">
        </div>

    </body>
    </html>
chatProblem.png
Was this page helpful?