React-select: menuShouldBlockScroll also blocks menu scrolling.

Created on 11 Feb 2020  路  10Comments  路  Source: JedWatson/react-select

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 ?

issubug-confirmed

Most helpful comment

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.

All 10 comments

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

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

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

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.

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.

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?

@flexdinesh reverting this commit seems to fix the issue.

https://github.com/JedWatson/react-select/commit/691a01171969da89e20097f9d603651bb18a8510#diff-16745c8f19a824159168a93abf7bb78b

@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 !

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pashap picture pashap  路  3Comments

joshualimpj picture joshualimpj  路  3Comments

ericj17 picture ericj17  路  3Comments

juliensnz picture juliensnz  路  3Comments

Meesam picture Meesam  路  3Comments