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

Fix for Menu bottom is scrolled into view even when menuShouldScrollIntoView=false #3262

Merged
merged 4 commits into from
Mar 18, 2021

Conversation

torkelo
Copy link
Contributor

@torkelo torkelo commented Dec 10, 2018

When the menu is placed inside a scrollable div a bit down on the page the menu always triggers a scroll to bottom of this div even when menuShouldScrollIntoView=false. This is really a big issue as it scrolls the parent container so much so the react select input does not become visible.

Was fixed by adding the if (shouldScroll) to the last case in getMenuPlacement. This case did not check this bool flag, the other scenarios in this case switch do check this variable.

Fixes #3459

@torkelo
Copy link
Contributor Author

torkelo commented Mar 4, 2019

rebased with master and created a bug report issue #3459

@torkelo
Copy link
Contributor Author

torkelo commented Apr 17, 2019

Any chance to merge this bugfix?

@freewind
Copy link

Why is this PR can't be merged? Have been waiting for many days!

@wangjohn
Copy link

I've also had a large number of users experiencing this issue, and it's a really huge UX issue since it's unexpected for the container to be moving around. It would be very nice to get this merged!

@MichaelKostin
Copy link

The same. I'm waiting for this changes.

@MichaelKostin
Copy link

@gwyneplaine could you take a look on the PR?

@freewind
Copy link

Please!

@freewind
Copy link

Almost a year !!!

@freewind
Copy link

@JedWatson @gwyneplaine Please have a look at this PR, thanks

…IntoView is false, happens when parent container is a scrollable div further down the page. The bug casues the menu bottom to be scrolled into view so that the select input/search is not visible
@torkelo torkelo force-pushed the menu-scroll-into-view-issue branch from f4de0ea to f2412a4 Compare January 7, 2020 10:34
@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2020

🦋 Changeset detected

Latest commit: 7a414a7

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

This PR includes changesets to release 1 package
Name Type
react-select Patch

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

@torkelo
Copy link
Contributor Author

torkelo commented Jan 7, 2020

Rebased this against latest master

@torkelo
Copy link
Contributor Author

torkelo commented Jan 16, 2020

Please try to find time to merge this, simple fix to a bug that forces us to maintain an npm fork.

@torkelo
Copy link
Contributor Author

torkelo commented Jan 24, 2020

I know it's hard to find time to review PRs but this seems like an easy one to review

@torkelo
Copy link
Contributor Author

torkelo commented Jan 24, 2020

If anyone needs this fix: https://www.npmjs.com/package/@torkelo/react-select

@dprokop
Copy link

dprokop commented Jan 31, 2020

@JedWatson friendly ping :)

@bladey bladey added uncertain pr/bug-fix PRs that are specifically addressing a bug pr/priority PRs that should be addressed sooner rather than later and removed uncertain labels May 26, 2020
@bladey bladey added the pr/needs-review PRs that need to be reviewed to determine outcome label Jun 4, 2020
@bladey
Copy link
Contributor

bladey commented Jun 5, 2020

Hey @torkelo, could you please provide a CodeSandbox of this PR with a working example? I'd like to test and get this merged.

@bladey bladey added awaiting-author-response Issues or PRs waiting for more information from the author and removed pr/needs-review PRs that need to be reviewed to determine outcome labels Jun 5, 2020
@torkelo
Copy link
Contributor Author

torkelo commented Jun 8, 2020

Not sure I will have time this week. You mean a CodeSandbox that replicates the issue or one that includes this change?

@torkelo
Copy link
Contributor Author

torkelo commented Jun 8, 2020

You can try this change on https://play.grafana.org/d/000000012/grafana-play-home?editPanel=2&orgId=1
Most dropdown's are react-select fork with this PR applied:

Screenshot from 2020-06-08 09-28-59

@bladey bladey requested review from JedWatson and bladey June 9, 2020 06:18
@torkelo
Copy link
Contributor Author

torkelo commented Jun 9, 2020

yay! can remove my npm fork after this :)

@bladey bladey linked an issue Jun 15, 2020 that may be closed by this pull request
@brentg5
Copy link

brentg5 commented Aug 12, 2020

@JedWatson Looks like this is super close to being merged! I'd love to have this fix ❤️

@bladey bladey added pr/in-review PRs currently in review by maintainers for the next release and removed pr/in-review PRs currently in review by maintainers for the next release labels Aug 24, 2020
@Methuselah96
Copy link
Collaborator

Methuselah96 commented Nov 14, 2020

I've started a fork of react-select. Feel free to resubmit this PR on the fork and we can get it merged and released.

EDIT: 🎉 I've archived the fork now that we've got some momentum in this repo and Jed is involved again. Sorry for the disturbance!

@brookeangel
Copy link

Echoing everyone who has advocated for this fix being merged 😄 This would be super helpful.

@ebonow ebonow added the menu-bug Addresses menu positioning, scrolling, or general interactions label Jan 16, 2021
@7ruth
Copy link

7ruth commented Feb 10, 2021

Really looking forward to this merge, thank you for awesome lib! 🙏

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 13, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7a414a7:

Sandbox Source
react-codesandboxer-example Configuration

@ebonow
Copy link
Collaborator

ebonow commented Mar 13, 2021

Sorry everyone for the long wait. This seems like an obvious bug fix and will move this into consideration for next version release.

@ebonow ebonow added this to the 4.3 milestone Mar 13, 2021
@ebonow
Copy link
Collaborator

ebonow commented Mar 13, 2021

@freewind (or anyone else) have any reservations about this?

@freewind
Copy link

@ebonow Sorry, just have been waiting too long and feel very sad

@ebonow
Copy link
Collaborator

ebonow commented Mar 14, 2021

@ebonow Sorry, just have been waiting too long and feel very sad

@freewind I can understand that and I empathize. I feel bad that so many people have given their time to contribute and then didn't even get the courtesy of a response. It's exactly why myself and others are putting in so much of our own free time to work through everything, and we're doing our best to make it right.

And while just last year there were 1,452 issues closed, 151 PR's closed, 56 PR's merged, communication could have been much better, so it's something that's been made a priority. As such, please feel free to use the discussion area or subscribe to #4293 for updates on releases if that's something that interests you.

That all said, I am committed to working through every issue and PR and any help with that is welcome.

@JedWatson
Copy link
Owner

Hi everyone, we finally got to this PR in our review this week, and it has now been approved and will be released imminently.

I want to say I'm sorry for leaving this so long. It's heartbreaking, and I apologise. It's such a simple fix to a clear bug that unfortunately just got lost in the noise for me.

@ebonow @Methuselah96 @Rall3n and @bladey have my immense gratitude for helping get the project back under control from a maintenance perspective. As Eric said, it's been an epic undertaking 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
menu-bug Addresses menu positioning, scrolling, or general interactions pr/bug-fix PRs that are specifically addressing a bug pr/in-review PRs currently in review by maintainers for the next release pr/priority PRs that should be addressed sooner rather than later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

menuIsOpen causing page to scroll down Scroll into view issue even when menuShouldScrollIntoView=false