Below are two videos showing the before and after the workaround. The first video shows the default behaviour where scrollTop() is only updated after the scroll event completes, the second video shows a workaround that has continuous updates during scrolling.
This was my 'before' code:
The main part of the code was the $(document).scroll() event handler. There the $(window).scrollTop() is looked up and set as text for display. Nothing fancy. That was the code for the first video.
My workaround to make continuous scrolling work added a couple of modifications...
First I set my div#body style so that it stretched to the size of the viewport, like so:
The second modification was to change the $(document).scroll() to this code:
The workaround responds to scroll events on the div#body instead and looks up scrollTop() on that DIV element instead of on the window object. This way continuous scroll events can be detected. The modified code was used in the second video.
You can get the source code for the before and after code on my GitHub - before code and after code.