scrolling inside box detector