use cross-browser alternative to window.scrollY. fix #12