Scrolling ScrollMenu will also scroll parent container's vertical scroll
See original GitHub issueDescribe the bug When the ScrollMenu is under a container with vertical scrolls, mouse wheel scrolls both of them.
To Reproduce
- Create a div with
height:100000px
andoverflow-y:scroll
- Put your
ScrollMenu
with a few items under the div - Try to scroll
ScrollMenu
with your mouse wheel - It will scroll both of them :c
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to allow vertical scroll on a container and horizontal ...
This scrollable div must allow: vertical scrolling; elements outside of the container (horizontal overflow). Attempts and results: When overflow ...
Read more >Making a div vertically scrollable using CSS - GeeksforGeeks
Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar.
Read more >Using CSS Overscroll-Behavior To Prevent Scrolling Of Parent ...
Ben Nadel demonstrates that the CSS property, overscroll-behavior, can be used to trap the mouse scroll wheel within an overflow container.
Read more >How To Create Horizontal Scrolling Containers - codeburst
Let's first create our container and our children divs inside of it that will scroll horizontally. The HTML is pretty simple. <div class="scrolling-wrapper">...
Read more >react-horizontal-scrolling-menu - npm
Items width will be determined from CSS styles. For navigation, you can use scrollbar, native touch scroll, mouse wheel or drag by mouse....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Check out example for V2, https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu/blob/main/example-nextjs/helpers/useHideBodyScroll/index.ts
Just moved it to other folder https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu/blob/main/example-nextjs/helpers/usePreventBodyScroll/index.ts