disabling actions after losing focus