Adjust height when keyboard opens
Hi, I have the problem that when the keyboard opens it moves the content out of view.
In React Native I can just use KeyboardAvoidingView and everything works fine, but I don't know how to do it on the web. What I want is that the scrollview automatically changes size when the keyboard opens, so that the last messages can still be seen. The screen has a height of 100svh.
Minimal Predroduction Repo: https://github.com/j3sch/input-mobile-scrollview
Cheers!
GitHub
GitHub - j3sch/input-mobile-scrollview
Contribute to j3sch/input-mobile-scrollview development by creating an account on GitHub.
2 Replies
flat-fuchsiaOP•2y ago
Kind of fixed it. I display the messages now always on the bottom and removed the height 100%
rare-sapphire•2y ago
https://github.com/TanStack/virtual/commit/439282237881db2cb91ba9d7956e6520cf69ab55 this new resizeItem feature may be of use to you
GitHub
feat: expose virtualizer.resizeItem & update doc (#534) · TanStack/...
Co-authored-by: Ele4nor <>