I build telegram mini-apps using React. It uses web view to display apps in the telegram. Telegram is like whatsup(who doesn't know).
I stumbled upon this issue, repro steps:
- Create a bunch of inputs
- Click on the last one
- The keyboard appears and the screen scrolls to the focused input
- When the keyboard is closed the viewport is not restored to its initial size and the black empty space can be seen in the bottom of the screen.
How can I fix it?
Default View
Opened keyboard and focused input is being scrolled to
Keyboard is closed and black space can be seen
<div className="bg-white h-[100vh] overflow-hidden relative flex flex-col gap-10">
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
<input type="text" placeholder="test" className="bg-red-300" />
</div>


