bug fix, mouse cursor was not reset when leaving document