Fix clicking on the canvas when the viewport is scrolled