In v 37.0, we started seeing some issues in some href pointing to ids, like #someId.
lwc v0.37.0: https://playground.lwcjs.org/projects/LdvLwWJGw/2/edit
I expect the href is not changed.
The expected result can be seen in v0.36.0:
lwc v0.36.0: https://playground.lwcjs.org/projects/LdvLwWJGw/1/edit
Notice how the generated html is: <a lightning-breadcrumb_breadcrumb="" href="#someId">breadcrumb pointing to some #someId</a>
lwc v0.37.0: https://playground.lwcjs.org/projects/LdvLwWJGw/2/edit
Notice how the genereted html differs: <a lightning-breadcrumb_breadcrumb="" href="#someId-2">breadcrumb pointing to some #someId</a> (especially: href="#someId-2")
All
fyi @ekashida
@jodarove I understand the result that you expect, but I'm not clear on what the use case for it is. Fragment-only URLs can only reference IDs in the same shadow. Since the corresponding ID should also have been transformed, the association should be preserved.
If the breadcrumb is supposed to reference an element outside of its shadow, then it sounds like this is actually a bug with lightning-breadcrumb and we will need to discuss some other alternative.
That is true if you are in a pure LWC app, when interacting with aura, this might be a use case.
@ekashida can we close this now?
The observed behavior in 0.37.0 is what we want. The change was reverted and will be released in the future. It is tracked by #1150.
Most helpful comment
That is true if you are in a pure LWC app, when interacting with aura, this might be a use case.