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

Fixed a regression with identifying the target if the browser doesn't… #24

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

mpilone
Copy link

@mpilone mpilone commented Dec 13, 2019

… support composedPath or path.

This is a regression introduced with #22 and #21. The original code before the PR would use srcEvent.target:

// find the correct target
let target = manager.element;
if (hasParent(input.srcEvent.target, target)) {
  target = input.srcEvent.target;
}
input.target = target;

After the PR it was using target directly:

...
} else {
    srcEventTarget = target;
  }

This causes an issue on browsers that fall into the final else block like IE and Edge. This PR restores the original functionality of using srcEvent.target:

...
} else {
    srcEventTarget = srcEvent.target;
  }

Copy link
Member

@WoodNeck WoodNeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello again @mpilone!
Looks like there was a mistake in the previous code, really thanks for checking that.
The PR looks good to me.

Copy link
Member

@daybrush daybrush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR.

@WoodNeck WoodNeck merged commit d64d47c into naver:master Dec 16, 2019
@WoodNeck
Copy link
Member

WoodNeck commented Dec 16, 2019

Hey @mpilone! I just released a new version(2.0.17) with a fix in this PR.
Check it, please ;)
(Also, I've modified your commit message to match Angular commit style guidelines that we use)

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

Successfully merging this pull request may close these issues.

None yet

3 participants