I have a div that gets paragraphs randomly inserted into it. Once the size of the div gets bigger than its container, it of course extends past the container thus creating scrollbars on the container. So that part is ok. The container with scrollbars is not the page, the scrollbars appear on a parent div
The problem comes in 2-fold. When a paragraph is inserted to make the div larger, the div makes an instant jump to the new size. After enough times it can get annoying quickly.
The other problem is when the div extends past the container, I can easily use javascript to scroll the container all the way down but, once again, its an instant jump which isn't very pleasant to watch over and over again.
I'm looking for a way to smooth this out, have the div expand smoothly to encompass the new paragraph and have the parent div scroll smoothly down if its extends past it.
It should also be noted that this is an electron html5 app and as such theres no need for cross-browser solutions or browser compatibility. Just one that works in the latest bleeding-edge version of chrome. I also don't care if the solution is pure javascript or framework-based.
Is this possible and if so how would I implement that?