Fix to cross-browser issue with following links

Recent releases of chrome and safari changed the order of events when
clicking a link that has an event listener.