JSFiddle - React, Tailwind, and code Playground

HTML

<p><b>Links with onclick handlers that return true break when invoked through jQuery</b></p>
<br/>
<p>This example demonstrates what I consider to be a bug in jQuery. The link below should navigate to an anchor on this page when clicked, but also has an onclick handler that alerts the text 'clicked!' and then returns true. When invoked through jQuery, the default action is not executed after the event handler returns, even though it should.</p>
<br/>
<p>In this example I use a link that navigates to an anchor, because JsFiddle won't allow navigating to other pages / websites, but normal links fail in the same way.</p>
<br/>
<a id="test" onclick="alert('clicked!'); return true;" href="#anchor">Take me to the anchor</a>

<hr/>

<button onclick="$('#test').click()">TEST with jQuery</button>
<button onclick="document.getElementById('test').click()">TEST without jQuery</button>

<hr/>

<p>Filler text to lengthen the page...
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
</p>

<p>Filler text to lengthen the page...
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
</p>

<p>Filler text to lengthen the page...
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
</p>

<p>Filler text to lengthen the page...
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
</p>

<p>Filler text to lengthen the page...
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
</p>

<a id="anchor"/>
<p>Clicking on the link will take you here. Using the 'TEST without jQuery' button does the same, but the button 'TEST with jQuery' does not work as expected.</p>