title: Event.PreventDefault() doesn't always work
body: <p>I just wanted to make a quick userscript to prevent websites from opening links in new tabs, so I can choose when to do so. Oh boy.</p>
  
  <p>I wanted to use plain javascript; I think it's enough for such an easy task. I was doing all my tests in Quora because that's where I decided I wanted to code that little snippet.</p>
  
  <p>Well, nothing worked. I started simple and went increasing the craziness of my code in light of the failure: <strong>the link kept opening</strong> no matter how many preventDefault()'s, return false's, prevent[*]Propagation(), eventListeners... Even modifying the dom to strip the <code>a</code> element from its target="_blank".</p>
  
  <p>In the end, I bit my tongue and tried jQuery with this little snippet:</p>
  
  <pre><code>$("a").click(function(event){
          event.preventDefault();
          alert("Was preventDefault() called: " + event.isDefaultPrevented());
      });
  </code></pre>
  
  <p>But that didn't do any good either. So I gave up. I then realized that the code seemed to work on other websites. Except on Quora.com. A regular Quora link looks like this:</p>
  
  <pre><code>&lt;a href="http://thewebsite.to/go"
      rel="noopener nofollow"
      target="_blank"
      onclick="return Q.openUrl(this);"
      class="external_link"
      data-qt-tooltip="thewebsite.to"
      data-tooltip="attached"&gt;
      Link text
  &lt;/a&gt;
  </code></pre>
  
  <p>There's plenty of crap there, for sure, but I've been stripping down attributes one by one until the bare bones: <code>&lt;a href="http://thewebsite.to/go"&gt;&lt;/a&gt;</code> and still doesn't work. Best of all is that even though the link opens, <code>event.isDefaultPrevented()</code> returns true!</p>
  
  <p>Why does that happen and how can I fix it?</p>