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: remove the use of detail as this is a synthetic event value and will not be compatible with React 17 #4515

Merged

Conversation

janechu
Copy link
Collaborator

@janechu janechu commented Mar 30, 2021

Description

Removed the check using detail and resolve whether a click is a single or double click using only setTimeout.

Motivation & context

The use of the synthetic events detail would occasionally result in console logs being generated from React. Due to this also being removed in React 17 the double click detection is remediated to work solely from setTimeout.

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Adding or modifying component(s) in @microsoft/fast-components checklist

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@EisenbergEffect
Copy link
Contributor

@janechu
Copy link
Collaborator Author

janechu commented Mar 31, 2021

@EisenbergEffect unfortunately I have an action for a single click as well as a double click. For React (not sure about native events), it will fire the double click once and the single click twice if a double click is used.

@codeclimate
Copy link

codeclimate bot commented Mar 31, 2021

Code Climate has analyzed commit caaac97 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 10.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 85.2% (0.0% change).

View more on Code Climate.

@janechu janechu merged commit 2e272a6 into master Mar 31, 2021
@janechu janechu deleted the users/janechu/remove-detail-use-in-navigation-click-checker branch March 31, 2021 19:33
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.

2 participants