Skip to content

uui-popover-container scroll event does not work when nested #713

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

Merged
merged 5 commits into from
Jan 23, 2024

Conversation

JesmoDev
Copy link
Contributor

@JesmoDev JesmoDev commented Jan 22, 2024

Popover container now listens to all parent scroll containers to make sure that a position update is triggered when scrolling.
Before it only listened to the body. Which meant that the popover would not update it's position if inside another scroll container.

Adds story to visualise the fix

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-713.westeurope.azurestaticapps.net

@JesmoDev JesmoDev requested a review from iOvergaard January 22, 2024 09:58
Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

Do we perhaps not need to unsubscribe the scroll listener, e.g. on disconnectedCallback?

Is there any chance the scroll listener could be registered as a passive listener?

@JesmoDev
Copy link
Contributor Author

Do we perhaps not need to unsubscribe the scroll listener, e.g. on disconnectedCallback?

Is there any chance the scroll listener could be registered as a passive listener?

Great suggestion. This has been added

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-713.westeurope.azurestaticapps.net

@nielslyngsoe nielslyngsoe changed the base branch from release/1.6.0 to v1/contrib January 23, 2024 09:58
@iOvergaard iOvergaard added the bug Something isn't working label Jan 23, 2024
@iOvergaard iOvergaard merged commit 656f181 into v1/contrib Jan 23, 2024
@iOvergaard iOvergaard deleted the bugfix/popover-container-scroll-event branch January 23, 2024 13:44
@iOvergaard iOvergaard changed the title Bugfix/popover container scroll event uui-popover-container scroll event does not work when nested Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants