Describe the bug
I used a click event in a pulldown menu components of a NavBar to close the pulldown after a menu item was clicked.
The click handler in the pulldown menu component used stopPropagtion. Doing so the click event could not reach the filebased router and the browser took over.
This should in my opinion be clear in the docs.
Reproduction
Block the click bubble using stopPropagation of routing anchors
Logs
No response
System Info
Severity
annoyance
Additional Information
Took me a couple of hours to find out why the Svelkit router ignored the anchor click of items in the pulldown menu.
For the pulldown menu component I used code, which worked fine in a Svelte project using my own hash router.
But the Sveltekit file-based router uses clicks to route.
Describe the bug
I used a click event in a pulldown menu components of a NavBar to close the pulldown after a menu item was clicked.
The click handler in the pulldown menu component used stopPropagtion. Doing so the click event could not reach the filebased router and the browser took over.
This should in my opinion be clear in the docs.
Reproduction
Block the click bubble using stopPropagation of routing anchors
Logs
No response
System Info
Severity
annoyance
Additional Information
Took me a couple of hours to find out why the Svelkit router ignored the anchor click of items in the pulldown menu.
For the pulldown menu component I used code, which worked fine in a Svelte project using my own hash router.
But the Sveltekit file-based router uses clicks to route.