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

onclick - react, zone.js #168

Closed
obecny opened this issue Aug 5, 2020 · 1 comment · Fixed by #537
Closed

onclick - react, zone.js #168

obecny opened this issue Aug 5, 2020 · 1 comment · Fixed by #537
Labels
up-for-grabs Good for taking. Extra help will be provided by maintainers

Comments

@obecny
Copy link
Member

obecny commented Aug 5, 2020

Investigate problem with onclick event for react when using plugin for user interaction , react plugin, xmlhttprequest plugin, and zone manager.
More context here -> #164 (comment)

@obecny obecny added the up-for-grabs Good for taking. Extra help will be provided by maintainers label Aug 5, 2020
@kkruk-sumo
Copy link
Contributor

I also found this bug recently. It looks like React attaches event listener only to root elements (or document for versions < 17.0.0).
instrumentation-user-interaction doesn't work here, because of this condition (document doesn't have the getAttribute method):

if (!element.getAttribute) {
  return undefined;
}

Changing the logic works, but the xpath is mapping to / (document).

The original event is still accessible though as the first extra argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
up-for-grabs Good for taking. Extra help will be provided by maintainers
Projects
None yet
2 participants