JedWatson / JedWatson/react-select

Scrollbar jumping on non touch capable devices (scroll using mouse)

Open
#4,640 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I found this weird scrollbar issue when using a mouse instead of the trackpad. Attaching the screen recording for a better understanding

Scroll using a mouse

https://user-images.githubusercontent.com/6171514/122398497-3cec2200-cf7a-11eb-81a4-90b6ebfd494e.mov

Scroll using a trackpad

https://user-images.githubusercontent.com/6171514/122398649-5f7e3b00-cf7a-11eb-91bb-c464cd25bafe.mov

PS: In both the screen recordings I am trying to scroll fast using the mouse as well as the trackpad.

When I pass captureMenuScroll={false}, the jumping issue has been fixed. But, it generates another problem that the scroll prevents in the select box and the body started scrolling.
Could someone please have a look at this issue and fix it?
Thanks!

Version: 4.3.1
Example used: One from the official website
Live demo: CodeSandbox
OS: macOS Big Sur, v11.3.1
Browser: Google Chrome, Version 91.0.4472.77 (Official Build) (x86_64)

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

Reproduce the behavior using the official website example or the linked CodeSandbox, comparing rapid mouse and trackpad scrolling. Start by tracing the implementation of captureMenuScroll; done means mouse scrolling no longer makes the scrollbar jump and disabling that option does not allow the body to scroll instead.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.