I made a resizable div and now I want a scrollbar (y-axis) when the user resized it too much. When there is enough space for the rows of text, the scrollbar should disappear. I thought this could be done with overflow-y: auto but it didn't.
What it should look like

What it actually looks like
https://jsfiddle.net/1wk4mevo/4/
As you can see, there is always a scrollbar even if there is enough space for all content in the div. How can I fix this? (code can be seen in the fiddle)