Looks correct. The list of messages gets hidden at the bottom, so you need to scroll down to see it. One solution is to use scrollTo + scrollHeight for a fix. But consider what happens if the user opens the input while scrolling through the list
Yes, that would be an edge case that this solution can't handle. It's sad that there isn't a native browser API to just tell it that it should keep the state to the bottom and not to the top.