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

menuShouldBlockScroll also blocks menu scrolling. #3929

Closed
2Steaks opened this issue Feb 11, 2020 · 15 comments
Closed

menuShouldBlockScroll also blocks menu scrolling. #3929

2Steaks opened this issue Feb 11, 2020 · 15 comments
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer

Comments

@2Steaks
Copy link

2Steaks commented Feb 11, 2020

Hi, I'm using menuPortalTarget to render outside of containers with overflow hidden such as table rows. In order for the menu position to be correct I have to set menuPosition to fixed. This works great except when you scroll the page and the menu position is not recalculated. To fix this I then use menuShouldBlockScroll which in combination with the other props achieves the desired result except for the fact that menuShouldBlockScroll also blocks the menu (has max-height with scroll auto) contents from being scrollable.

Would it be possible to prevent scrolling for all elements except for .react-select__menu-list ?

@flexdinesh
Copy link
Collaborator

Hey @2Steaks would you be replicate the issue in a codesandbox? It'd be easier to comprehend the issue with an example.

@flexdinesh flexdinesh added awaiting-author-response Issues or PRs waiting for more information from the author status: needs more info labels Feb 21, 2020
@2Steaks
Copy link
Author

2Steaks commented Feb 28, 2020

Good shout @flexdinesh, here you go: https://codesandbox.io/s/festive-dirac-izf5y?fontsize=14&hidenavigation=1&theme=dark

@epotockiy
Copy link

Confirmed the same issue for me, @flexdinesh do you check this bug in sandbox?
I made investigation and figured out, that this were broken after release of 3.0.5 version
I checked commits, and find this commit
When i reverted this changes locally, scroll start working again
I don't know reason of this changes, but i think that this should be reverted or updated

@stnwk
Copy link

stnwk commented Mar 30, 2020

Hi @JedWatson can you give any more insights into this? This is a big bummer :(

@flexdinesh flexdinesh added issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer todo and removed awaiting-author-response Issues or PRs waiting for more information from the author status: needs more info labels Mar 31, 2020
@flexdinesh
Copy link
Collaborator

Hey @2Steaks thanks for the codesandbox I can see it now. I'll get to it sometime soon. I'll update here once we make progress.

@srinivasmerugu
Copy link

Hey @2Steaks thanks for the codesandbox I can see it now. I'll get to it sometime soon. I'll update here once we make progress.

Hi @2Steaks Please let us know once it is pushed.

@engPabloMartinez
Copy link

Hey team, any news around a fix for this? maybe a temporary one? is going back to 3.0.4 the only workaround for now?

@2Steaks
Copy link
Author

2Steaks commented May 21, 2020

@flexdinesh reverting this commit seems to fix the issue.

691a011#diff-16745c8f19a824159168a93abf7bb78b

@bladey bladey added pr/needs-review PRs that need to be reviewed to determine outcome and removed todo labels May 26, 2020
@srinivasmerugu
Copy link

@flexdinesh Even we are waiting for this fix as we are using 3.1.0 features as well and do not want to go back to 3.04 version. Please let us know once you revert the 691a011#diff-16745c8f19a824159168a93abf7bb78b or give any other solution .

Thank you !

@bladey bladey removed the pr/needs-review PRs that need to be reviewed to determine outcome label Jun 12, 2020
@bladey
Copy link
Contributor

bladey commented Jun 15, 2020

Hello -

Thanks for reporting this issue.

This bug has been reported multiple times as per issue #4088.

A new master issue #4088 has since been created to keep track this this bug.

This new issue will exist as the source of truth going forward to investigate the issue, report findings, and implement a bug fix.

We'll take into account all the details above while investigating.

If you feel this issue has been wrongly closed as it isn't related to the new master issue #4088, please let us know and we'll take another look.

Thank you!

@bladey bladey closed this as completed Jun 15, 2020
@eddiecooro
Copy link

@bladey
I think this issue is not related to #4088
#4088 is about the menu not following the scroll when the menuShouldBlockScroll is false. This issue is about the menu scroll also getting blocked when the menuShouldBlockScroll is true

@Methuselah96
Copy link
Collaborator

@Eddie-CooRo Is this still an issue for you? It would be great if you could create a CodeSandbox that reproduces the issue.

@eddiecooro
Copy link

eddiecooro commented Feb 9, 2021

Ugh... I was following this issue and #4088 for over one-two months already 😅
Didn't notice a fix has published for it three days ago 😁

For book-keeping purposes, this issue is "solved" in v4 😍 ✌️
Thanks, @Methuselah96 ✌️

@iksent
Copy link

iksent commented Jul 12, 2021

I am experiencing this issue at v4.3.0 :(

The next config sometimes blocks menu scrolling:

menuPortalTarget: document.body,
menuPosition: 'fixed',
menuShouldBlockScroll: true,
menuShouldScrollIntoView: true,

UPD: I were using custom component for MenuList without components.MenuList - that was the reason.

@ranno-lauri
Copy link

I am experiencing this issue at v4.3.0 :(

The next config sometimes blocks menu scrolling:

menuPortalTarget: document.body,
menuPosition: 'fixed',
menuShouldBlockScroll: true,
menuShouldScrollIntoView: true,

UPD: I were using custom component for MenuList without components.MenuList - that was the reason.

For me it was not passing and spreading the base props for custom menuList styling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests