#237: fix scrollTo viewport element

This commit is contained in:
SleepWalker
2016-12-28 08:11:35 +02:00
parent b328f7ba92
commit c8c8f5eb6d
2 changed files with 8 additions and 2 deletions

View File

@@ -31,7 +31,13 @@ export default function scrollTo(y, viewPort) {
return;
}
viewPort.scrollTop = y + delta;
const newScrollTop = y + delta;
viewPort.scrollTop = newScrollTop;
if (viewPort.scrollTop === 0) {
scrollWasTouched = true;
console.warn('The viewPort is not scrollable', viewPort);
}
}());
});