How to find what is causing a preventDefault which overrides normal click behavior
javascript
Solution
You should be able to override `Event.prototype.preventDefault` and add a `debugger` statement as its first line.
Run the following via the console.
var oldEPD = Event.prototype.preventDefault;
Event.prototype.preventDefault = function() {
debugger;
oldEPD.call(this);
};
Problem
I've inherited some large piece of code. Somewhere inside a way too generalised `e.preventDefault()` is prohibiting the normal behavior of an anchor click. I thought about running profiler in Chrome webtools to see what is happening when clicking on a particular link, hoping to trace it back to the culprit statement. However I haven't had much luck how can I trace back (if possible) a statement that is overriding normal click behavior, when clicking a link in Chrome webtools? (I am using jQuery)