Changed api to have beforeCallback do event.preventDefault() to prevent callback from firing.