Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopping click event propagation in navigo links. #296

Open
ejez opened this issue May 29, 2021 · 0 comments
Open

Stopping click event propagation in navigo links. #296

ejez opened this issue May 29, 2021 · 0 comments

Comments

@ejez
Copy link
Contributor

ejez commented May 29, 2021

I would like to ask if there is a reason for stopping the click event propagation in

e.stopPropagation();

I am asking because I am using a UI library where the click event in some links is not only used for navigation, but also used by parent elements to change styles for example.

To give some context, in this nav bar:

image

the nav bar items are augmented with data-navigo, clicking on an item needs also to propagate to the parent element (the nav bar) which is responsible for updating the selection indicator (the white line below the active item).

My suggestion is to make stopPropagation optional (or removing it if there is no obvious reason for using it).

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant