My goal is to dynamically add a div to the bottom of another div by using a JavaScript button click event. However, I have encountered an issue where once the outer container reaches its maximum height, the list no longer scrolls to the bottom after adding a new item.
To see the issue in action, you can check out this JSFiddle
If you repeatedly click the red add button until there are around 13 items in the list, it appears that the scrollTop function stops working correctly and the scroll position remains static.
I've experimented with various CSS configurations for both the container and the added div, but I'm still struggling to find a solution. Any assistance would be greatly appreciated.