Decouple the scroll event from callback functions.