Links inside router navigation element should not trigger navigation
What needs to be done?
When a link (<a href="https://example.com">External link<a>
) is present in a solid-display
element that have a next
action set up, clicking on the link triggers the router. We should be able to avoid this, either by adding an attribute to the <a>
tag (data-prevent-navigation
) or fully automatically by detecting that the click come from a link with an external href (that one could be tricky).
Targeted application
Requested by @alexbourlier for project "Event component"
Technical details
That should be simple to implement by just calling event.preventDefault
upon click.
Links
How to complete
- How to complete a Feature
- Ask any question you have in the issue comments before starting
- Create a new branch named ${ISSUE_NUMBER}-issue-name
- Implement a simple test to illustrate the desired functionality
- Write some code to complete this task
- Write some additional tests to cover edge cases and some possible errors
- Write documentation about what have you done and why you have done it this way
- Submit a merge request