Register mouse event only inside canvas