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

Wrap update in function to prevent event from being passed as value #1612

Merged
merged 3 commits into from
Feb 6, 2023
Merged

Wrap update in function to prevent event from being passed as value #1612

merged 3 commits into from
Feb 6, 2023

Conversation

brandongregoryscott
Copy link
Contributor

@brandongregoryscott brandongregoryscott commented Feb 4, 2023

Overview

Resolves #1556 - the event from resize and scroll events was being passed as the first parameter to update, which would cause a NaN error. Since we're not using the event for anything (just looking to recalculate the position when scrolling or resizing the window), I wrapped the update call in a function.

Tested using the minimal reproduction code linked in the issue.

Screenshots (if applicable)

Documentation

  • Updated Typescript types and/or component PropTypes
  • Added / modified component docs
  • Added / modified Storybook stories

@netlify
Copy link

netlify bot commented Feb 4, 2023

Deploy Preview for evergreen-storybook ready!

Name Link
🔨 Latest commit 8c6cd3f
🔍 Latest deploy log https://app.netlify.com/sites/evergreen-storybook/deploys/63e170fa94c65b0009719c39
😎 Deploy Preview https://deploy-preview-1612--evergreen-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@brandongregoryscott brandongregoryscott merged commit ad912ff into segmentio:master Feb 6, 2023
@brandongregoryscott brandongregoryscott deleted the popover-scroll-issue branch February 6, 2023 21:39
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.

Popover disappears when rendered and received a single scroll event
2 participants