Fixed mouseevents, to turn off highlighting and dragging when mouse leaves the window