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

preventOverflow.boundariesElement modifier not working properly for scrollParent #72

Closed
greg-a-smith opened this issue Nov 15, 2017 · 4 comments

Comments

@greg-a-smith
Copy link
Contributor

I'm not sure if this is related to react-popper or the underlying popper.js, but it appears as though the modifier preventOverflow.boundariesElement does not work as expected with the value scrollParent. I am testing with a target inside of a scrolling div (inside a modal) and I am not seeing the same behavior as I do when I set preventOverflow.boundariesElement to viewport. I am most interested in implementing the "hide" functionality when a target scrolls out of view and I am able to get that working with viewport, but NOT with scrollParent.

@souporserious
Copy link
Collaborator

souporserious commented Jan 8, 2018

Sorry for the late reply, is it possible you can provide a demo using something like codesandbox please? This sounds like it may be related to PopperJS core, but I'm not sure.

@greg-a-smith
Copy link
Contributor Author

So this one was interesting. I stumbled onto the reason this was occurring while attempting to create a branch to demonstrate the issue. In the end, it appears to be a bug with NPM.

In our project, we have react-popper as a dependency defined as ^0.7.4. This, in turn, has a dependency on popper.js defined as ^1.12.5. When I run npm install on our project, it ultimately ends up loading popper.js@1.12.6. While attempting to create a branch on react-popper demonstrating the issue, I found that running npm install was loading popper.js@1.12.9. Why the difference?

The issue with using scrollParent for preventOverflow.boundariesElement was fixed in popper.js in version 1.12.7 with this commit (floating-ui/floating-ui@904d46b).

I was able to "fix" the issue in our project by adding a top-level dependency for popper.js for ^1.12.9 even though we don't directly use popper.js in our code. When I do this, npm install ends up loading popper.js@1.12.9 for both the root dependency and the dependency for react-popper. The popper.js under react-popper is marked as "deduped".

I created an issue for NPM (npm/npm#19638). I will close the issue for react-popper.

@RomanPoghosyan
Copy link

I have the same issue now, anyone can help me? I think something is broken after that commit

@FezVrasta
Copy link
Member

Please open a new issue following the issue template, this one is 3 years old.

@floating-ui floating-ui locked as resolved and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants