JedWatson / JedWatson/react-select

Menu has scroll issue when hover the last visible menu item

Open
#5,831 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Problem

When using menuPlacement="auto" on a menu and it's rendered at the top with a scroll, hovering over the last item causes the scroll to jump unexpectedly.

Expected Behavior

The scroll should remain stable when hovering over the last item in the menu.

How to reproduce

I recorded video using an Portaling example from the official website https://react-select.com/advanced#portaling

https://github.com/JedWatson/react-select/assets/17438575/c9b71aff-7487-42a1-a432-3f26f72e83ce

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Portaling example in the official react-select documentation and reproduce the problem using menuPlacement="auto" with the menu rendered at the top. Investigate the menu's hover and scrolling behavior around the last visible item; done means hovering there no longer causes the scroll position to jump.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.