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

feat: make auto-tracking solely use css selector allowlist #606

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

liuyang1520
Copy link
Contributor

Summary

feat: make auto-tracking solely use css selector allowlist

This change make cssSelectorAllowlist the single source of truth for the selector configuration, which allows us to track clicking of elements not in the default tag list: ['a', 'button', 'input', 'select', 'textarea', 'label']. Reason is some button might be built with div, not with the button.

Add event.stopPropagation(); specifically, as nested element clicking may cause unexpected events flood.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@liuyang1520 liuyang1520 requested review from justin-fiedler and a team October 26, 2023 01:01
@liuyang1520 liuyang1520 force-pushed the feat-auto-tracking-solely-use-cssselectorlist branch from a237fd7 to 2fc9c38 Compare October 26, 2023 01:04
Copy link
Contributor

@justin-fiedler justin-fiedler left a comment

Choose a reason for hiding this comment

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

Thanks @liuyang1520! Looks good. See fix on README.

@liuyang1520 liuyang1520 merged commit 404d09e into v1.x Oct 26, 2023
3 checks passed
@liuyang1520 liuyang1520 deleted the feat-auto-tracking-solely-use-cssselectorlist branch October 26, 2023 23:40
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.

3 participants