-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Current state: When clicking on a link that could trigger navigation, if the click event is prevented in an event listener, the navigation command is still processed.
Desired behavior: preventDefault being called on the event should cancel the navigation command before it's even issued
How it can be fixed: Check for e.defaultPrevented where it makes sense
Current hack fix:
class Router extends Highway.Core {
navigate(e) {
if(e?.defaultPrevented) {
return;
}
super.navigate(e);
}
}
const router = new Router(/* [...] */);Metadata
Metadata
Assignees
Labels
No labels