preventing recording when mouse is out of bounds