Adding prevention of InvalidStateError to mouse event.