moved to mousedown event to properly handle keyboard focus