Remove clearIntervals and use scrollTop without setInterval given below
$('.dragable').draggable({
zIndex:100,
revert: "invalid",
helper: "clone",
scroll: true,
drag: function(e)
{
if(e.clientY <= distance)//top
{
$(document).scrollTop(e.clientY - step)
}
if(e.clientY >= ($(window).height() - distance))//bottom
{
$(document).scrollTop(e.clientY + step)
}
}
});
it is working fine