changed so that it dispatches event for clicks that are not on links