Dmxrouting.js 3.0.5 breaks my nav links

After upgrading from dmxrouting.js 3.0.2 -> 3.0.5 my nav link like this no longer works (nothing happens after click, I expect it to go to the url in the href):

<li class="nav-item">
     <a href="https://google.com" class="nav-link py-1" data-bs-dismiss="offcanvas" data-bs-target="#sidebarMenu">
        <i class="bi bi-patch-question-fill pe-none me-2"></i>
        <span>Help</span>
    </a>
</li>

@patrick We had discussion about this before, can't find the thread.
Is this intended? I don't see anything wrong with this html.

Removing the data-bs attributes seems to fix it, but I'd like to be able to keep that in.

I also prefer if the selector remains (dmx.config.mapping["a[href]"] = "link"), so I can use <a> html elements for example to open bootstrap tabs.

I now had to change:

<a class="nav-item nav-link active" data-bs-toggle="tab" role="tab" aria-controls="publish" aria-selected="true" data-bs-target="#publish" id="publicationSettings">Publicatie</a>

To:

<button class="nav-item nav-link active" data-bs-toggle="tab" role="tab" aria-controls="publish" aria-selected="true" data-bs-target="#publish" id="publicationSettings">Publicatie</button>

In summary:

  1. Why does it hijack and break the nav link?
  2. Can we keep the selector a and not a[href] ?

Thanks!

The mapping was changed from a[href] to a due to many users did do dynamic bindings of the href and not set the static. So initial there was no href on the link and it would not initialize as a route link.

Make sure dmxRouting.js is loaded before dmxBootstrap5Navigation.js. In older project it is possible that the order of the script includes is not correct.

The dmxrouting.js is loaded before the dmxBootstrap5Navigation

So it's still strange to me the link functionality breaks when having these attributes:

data-bs-dismiss="offcanvas" data-bs-target="#sidebarMenu"

I can remove them as I don't absolutely need them so I'm not blocked.
But is that intended behaviour?

Re: the selector... Okay thanks, got confused about it. I thought it become MORE specific.