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

Exclude fixed position node's ancestors from getScrollableAncestors #415

Merged
merged 3 commits into from
Aug 20, 2021
Merged

Exclude fixed position node's ancestors from getScrollableAncestors #415

merged 3 commits into from
Aug 20, 2021

Conversation

cantrellnm
Copy link
Contributor

As reported in #61 and #298 (any others?) positioning doesn't work as expected when the DndContext is inside a fixed position container.

This small change (preventing getScrollableAncestors from continuing to search if a fixed position node is found) seems to resolve the issues I had, but there may be some nuance I'm missing and I only tested it with my own project.

@changeset-bot
Copy link

changeset-bot bot commented Aug 13, 2021

🦋 Changeset detected

Latest commit: 40578fd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@dnd-kit/core Minor
@dnd-kit/modifiers Major
@dnd-kit/sortable Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

cantrellnm and others added 3 commits August 20, 2021 11:11
The `getComputedStyle` method is expensive and thus we should minimize how often it is called where possible
@clauderic clauderic merged commit 2ba6dfe into clauderic:master Aug 20, 2021
@github-actions github-actions bot mentioned this pull request Aug 20, 2021
@cantrellnm cantrellnm deleted the skip-fixed-ancestors branch August 26, 2021 23:12
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.

None yet

2 participants