List automatically scrolled to the top after selecting item from the bottom of scrollable list
See original GitHub issuedownshift
version: 1.22.3node
version: 8.9.3npm
(oryarn
) version: 5.5.1
What you did: I have multiselect implemented (checkbox + label items), scrollable list, I selected the item from the bottom of scrollable list (selectItem
method).
What happened: after selecting the item from the bottom of scrolled list, the list automatically scrolled to the top which is not intended behavior.
Is there any way to prevent it? When I select item I want the scrollable dropdown list to stay at the same scrolled position.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
List automatically scrolled to the top after selecting item from ...
When I select item I want the scrollable dropdown list to stay at the same scrolled position.
Read more >Keep overflow div scrolled to bottom unless user scrolls up
There is a method called *.scrollIntoView . After running this method once, it keeps the container scroll at the bottom. Even after adding...
Read more >Automatic scrolling, only if a user already scrolled the bottom ...
First, we need a list of items, an HTML element to display these items in and a method to call for scrolling to...
Read more >Scroll to location within component - MATLAB scroll - MathWorks
scroll ( container , vlocation ) scrolls a container or button group vertically. Specify vlocation as 'top' or 'bottom' . For more information...
Read more >How to scroll automatically to the Bottom of the Page using ...
To auto scroll a page from top to bottom we can use scrollTop() and height() method in jquery. In this method pass the...
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
Hmm… I feel like a well placed onClick handler with event.preventDefault() could help here.
Also, there was recently a release that may have fixed this 🤔 are you on the latest?
For me it was (at least it seams so) auto focusing on search input element after you choose an element. Not sure what was causing it to focus, but since my search input is inside the menu itself on the top of the list, focusing was causing scroll to it. I just solved the problem by making search input sticky to top of the menu container.