I refactored the logic around this some time ago, but left the choice to default to document.body.
Scrolling with document.body is no longer working in the latest versions of webkit, and we probably should have been defaulting to use document.scrollingElement all along.
IE doesn't have document.scrollingElement, but documentElement seems to work just fine.
While setting overflow-y on one of the parent nodes will still work with this (see example.html for some nested lists), I've noticed that recent versions of webkit have some strange behavior that doesn't let the scroll go all the way, when scrolling within an element, and not the entire page. I was running into that in my app, and this fix along with some changes to the overflow-y property in my app CSS fixed the issue.
This PR also allows scrollContainer to be explicitly set as an option, in case anyone wants even finer control of which parent is getting its scrollTop set during the reorder dragging.
This fixes #109
I refactored the logic around this some time ago, but left the choice to default to document.body. Scrolling with document.body is no longer working in the latest versions of webkit, and we probably should have been defaulting to use document.scrollingElement all along.
IE doesn't have document.scrollingElement, but documentElement seems to work just fine.
While setting
overflow-y
on one of the parent nodes will still work with this (seeexample.html
for some nested lists), I've noticed that recent versions of webkit have some strange behavior that doesn't let the scroll go all the way, when scrolling within an element, and not the entire page. I was running into that in my app, and this fix along with some changes to the overflow-y property in my app CSS fixed the issue.This PR also allows
scrollContainer
to be explicitly set as an option, in case anyone wants even finer control of which parent is getting itsscrollTop
set during the reorder dragging.