This page uses an overflow box so you can scroll through content:
http://jsbin.com/itajok/539/edit?html,js,output
If you scroll to the bottom of that content, your scroll is stuck in that box until you move your cursor out of the box and scroll through the rest of the page.(the element in the example is set to position:fixed, but removing that rule still has the same result)
And this happens to me for any div with defined height and overflow: auto;
<style>
div {
overflow: auto;
height: 100px;
}
</style>
<div>
Overflow is auto and if I add more content that exceeds the height, I can scroll
</div>
How can I make it so that, after scrolling to the bottom of an overflow div, it returns to scrolling the actual page automatically?
JQuery solution
First check this JS functions:
Now let me show you a snippet where using the functions it detects when you have reached the end of the content of a DOM element, as could be a div, and then change the focus to the main container. To continue scrolling from there.
The only wrong, as it is binded to the event scroll of the content item,
and the example detects full scroll with:
It is a right way to detect full scroll having in mind the block height BUT For your situation, you will notice sometimes you need to scroll, when you are down yet, to execute the jquery and change the focus. You can always improve this but is a bit of what you are looking for. Feel free to ask what you need.