JedWatson / JedWatson/react-select

Bug with menu placement in multiple mode when using menuPortalTarget

Open
#5,181 0 comments 0 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

Hello, thank you for this wonderful component!
Found a bug with menu - when I use menuPortalTarget={document.body} and isMulti together I encounter strange menu positioning.
It should be placed right under the control, but sometimes menu overlaps it, and sometimes there is a gap.
menu_bug

Fixes with hovering on any menu element (not selected or focused)
Tried to use some hack - trigger mouseover event on hover and change - sometimes it works, but not works when I use keyboard for navigate and select.
Demo included - https://codesandbox.io/s/codesandboxer-example-forked-c9u1u5?file=/example.tsx

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 linked CodeSandbox example.tsx and reproduce the issue using menuPortalTarget={document.body} with isMulti. Trace the menu positioning behavior for both mouse hover and keyboard navigation; done means the menu consistently sits directly beneath the control without overlap or a gap.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.