Hi,
I have this code:
<script type="module">
import hotwiredTurbo from 'https://cdn.skypack.dev/@hotwired/turbo';
</script>
<script type="text/javascript">
document.addEventListener("turbo:click", function () {
alert("This alert box was called with the click event");
event.preventDefault();
})
</script>
<div class="container">
<ul class="navbar-list">
<li class="navbar-item"><a class="navbar-link" href="/">Home</a></li>
<li class="navbar-item"><a class="navbar-link" href="/login">Login</a></li>
<li class="navbar-item"><a class="navbar-link" *data-turbo-action="replace"* href="/about">About</a></li>
</ul>
</div>
Every link fires the Turbo click event, not just the one decorated with data-turbo-action. Is this normal behaviour?
Cheers.