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

fix: return early if click targets element outside of root node #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: return early if click targets element outside of root node #13

wants to merge 1 commit into from

Conversation

m90
Copy link

@m90 m90 commented Sep 4, 2019

This is related to choojs/choo#704

It looks like clicks outside the given root node would still be handled as the check of

if (!node || node === root) return

would never apply until the traversal has reached an anchor element.

Two questions/concerns from my side:

  • Does Node.contains align with the supported browser range?
  • In (the unlikely) case of root being an anchor element itself, a click on this element would also be skipped right now. This is the case with and without the fix, yet I am not sure if this is considered ok or should be fixed?

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

Successfully merging this pull request may close these issues.

1 participant