route icon indicating copy to clipboard operation
route copied to clipboard

added support for routes with fragments

Open geonanorch opened this issue 3 years ago • 0 comments

Considering anchors pointing to a path with fragment such as: <a href="/page#fragment">fragment</a>. Currently such anchors are ignored by the router and fall back to the default event processing. This might be ok when already on /page, but when coming from another pathname it results in a full reload of the application.

This pull request lets the router handle clicks on such anchors. It also includes a small step to ensure that the browser will actually scroll to the designated fragment.

I added a new test to verify the behavior (the test does fail without this patch). Looking at the code I could spot no negative side-effect, but I do not claim to understand fully the router code.

geonanorch avatar Mar 01 '22 13:03 geonanorch