For some reason I can’t figure out, the value returned by element.scrollHeight is about 50-60px more than the actual content height. It should represent the height of the inner p element here but is consistently higher. What am I missing?
Here the height is actually the presumed incorrect value but I’m changing the width of the element a bit later on myself in order to put the scrollbar out of view (which was the entire intention of the pen initially), with which it has a bit more space and becomes somewhat shorter.
My brain really has to get into coding again. Like in the early days, spending hours over something rather obvious. :-/