Scroll issue

Hi,
I am facing a issue while scrolling codemirror editor, assume having some code for which vertical scroll bar must be in a height of 50px, but it was like 5px. If I scroll to the bottom of the script throughout the scroll height keep on increasing and finally getting its actual height.

But without scroll if I search for a text at the bottom of the script then scroll bar is getting splitted vertically like one below another. At this point If I scroll upwards it was getting down few lines like if I scroll 10 lines it was getting downward by 4 lines.

I am having trouble thinking of a situation that could cause the scrollbar to split in two. Can you reduce the issue you’re seeing down to a small script?