Send the 'on-cancel' action when clicking outside the form,

only if the action is set